Ejemplo n.º 1
0
        private static MetadataJavaMethod ReadJavaMethod(this DataInputStream stream)
        {
            var method = new MetadataJavaMethod
            {
                Name        = stream.ReadUtfAndIntern(),
                ReturnType  = stream.ReadUtfAndIntern(),
                AccessFlags = stream.ReadAccessFlagsParameter(),
                Parameters  = stream.ReadArray(stream.ReadJavaParameter)
            };

            return(method);
        }
Ejemplo n.º 2
0
        private static MetadataJavaField ReadJavaField(this DataInputStream stream)
        {
            var field = new MetadataJavaField
            {
                Name        = stream.ReadUtfAndIntern(), Type = stream.ReadUtfAndIntern(),
                AccessFlags = stream.ReadAccessFlagsParameter()
            };

            var hasConstantValue = stream.ReadBoolean();

            if (hasConstantValue)
            {
                field.ConstantValue = stream.ReadArray(stream.ReadByte);
            }

            return(field);
        }
Ejemplo n.º 3
0
        private static MetadataJavaClass ReadJarClass(this DataInputStream stream)
        {
            var @class = new MetadataJavaClass
            {
                ClassName     = stream.ReadUtfAndIntern(),
                AccessFlags   = stream.ReadAccessFlagsParameter(),
                Interfaces    = stream.ReadArray(stream.ReadUtfAndIntern),
                AllInterfaces = stream.ReadArray(stream.ReadUtfAndIntern)
            };

            @class.Interfaces      = stream.ReadArray(stream.ReadUtfAndIntern);
            @class.AllSuperClasses = stream.ReadArray(stream.ReadUtfAndIntern);
            @class.Methods         = stream.ReadArray(stream.ReadJavaMethod);
            @class.Fields          = stream.ReadArray(stream.ReadJavaField);

            return(@class);
        }