Пример #1
0
        public ByteCode_anewarray(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool)
            : base(code)
        {
            name = "anewarray";
            size = 3; // 2 bytes defining index into operand pool

            UInt16 fieldIndex = reader.ReadUInt16();
            reference = (ConstantPoolInfo_Class)pool[fieldIndex - 1];
        }
Пример #2
0
        public ByteCode_new(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool)
            : base(code)
        {
            name = "new";
            size = 3; // 2 bytes defining index into operand pool

            classIndex = reader.ReadUInt16();
            classRef = (ConstantPoolInfo_Class)pool[classIndex - 1];
        }
Пример #3
0
        public ByteCode_instanceof(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool)
            : base(code)
        {
            name = "instanceof";
            size = 3; // 2 bytes defining index into operand pool

            UInt16 methodIndex = reader.ReadUInt16();
            clazz = (ConstantPoolInfo_Class)pool[methodIndex - 1];
            className = clazz.getClassName();
        }
Пример #4
0
        public ByteCode_checkcast(byte code,MSBBinaryReaderWrapper reader,ConstantPoolInfo[] pool)
            : base(code)
        {
            name = "checkcast";
            size = 3; // 2 bytes defining index into operand pool

            UInt16 methodIndex = reader.ReadUInt16();
            reference = (ConstantPoolInfo_Class)pool[methodIndex - 1];

            // check for array type
            if (reference.getClassName().StartsWith("[L")){

                className = reference.getClassName();
                // [L...;
                className = className.Substring(2,className.Length-3);
                isArray = true;
            }
            else {
                className = reference.getClassName();
            }
        }