Examples of addMethodrefInfo()


Examples of javassist.bytecode.ConstPool.addMethodrefInfo()

    String className = cp.getFieldrefClassName(index);
    if ( !filter.handleReadAccess( className, fieldName ) ) {
      return pos;
    }
    String desc = "()" + cp.getFieldrefType( index );
    int read_method_index = cp.addMethodrefInfo(
        cp.getThisClassInfo(),
        EACH_READ_METHOD_PREFIX + fieldName,
        desc
    );
    iter.writeByte(Opcode.INVOKEVIRTUAL, pos);
View Full Code Here

Examples of javassist.bytecode.ConstPool.addMethodrefInfo()

    String className = cp.getFieldrefClassName(index);
    if ( !filter.handleWriteAccess( className, fieldName ) ) {
      return pos;
    }
    String desc = "(" + cp.getFieldrefType( index ) + ")V";
    int write_method_index = cp.addMethodrefInfo(
        cp.getThisClassInfo(),
        EACH_WRITE_METHOD_PREFIX + fieldName,
        desc
    );
    iter.writeByte(Opcode.INVOKEVIRTUAL, pos);
View Full Code Here

Examples of javassist.bytecode.ConstPool.addMethodrefInfo()

    if ( !filter.handleReadAccess( className, fieldName ) ) {
      return pos;
    }

    final String fieldReaderMethodDescriptor = "()" + constPool.getFieldrefType( index );
    final int fieldReaderMethodIndex = constPool.addMethodrefInfo(
        constPool.getThisClassInfo(),
        EACH_READ_METHOD_PREFIX + fieldName,
        fieldReaderMethodDescriptor
    );
    iter.writeByte( Opcode.INVOKEVIRTUAL, pos );
View Full Code Here

Examples of javassist.bytecode.ConstPool.addMethodrefInfo()

    if ( !filter.handleWriteAccess( className, fieldName ) ) {
      return pos;
    }

    final String fieldWriterMethodDescriptor = "(" + constPool.getFieldrefType( index ) + ")V";
    final int fieldWriterMethodIndex = constPool.addMethodrefInfo(
        constPool.getThisClassInfo(),
        EACH_WRITE_METHOD_PREFIX + fieldName,
        fieldWriterMethodDescriptor
    );
    iter.writeByte( Opcode.INVOKEVIRTUAL, pos );
View Full Code Here

Examples of javassist.bytecode.ConstPool.addMethodrefInfo()

    String className = cp.getFieldrefClassName(index);
    if ( !filter.handleReadAccess( className, fieldName ) ) {
      return pos;
    }
    String desc = "()" + cp.getFieldrefType( index );
    int read_method_index = cp.addMethodrefInfo(
        cp.getThisClassInfo(),
        EACH_READ_METHOD_PREFIX + fieldName,
        desc
    );
    iter.writeByte(Opcode.INVOKEVIRTUAL, pos);
View Full Code Here

Examples of javassist.bytecode.ConstPool.addMethodrefInfo()

    if ((!classfile.getName().equals(className))
        || (!writableFields.containsKey(fieldName))) {
      return pos;
    }
    String desc = "(" + (String) writableFields.get(fieldName) + ")V";
    int write_method_index = cp.addMethodrefInfo(cp.getThisClassInfo(),
                                                 EACH_WRITE_METHOD_PREFIX + fieldName, desc);
    iter.writeByte(Opcode.INVOKEVIRTUAL, pos);
    iter.write16bit(write_method_index, pos + 1);
    return pos;
  }
View Full Code Here

Examples of javassist.bytecode.ConstPool.addMethodrefInfo()

    if ((!classfile.getName().equals(className))
        || (!readableFields.containsKey(fieldName))) {
      return pos;
    }
    String desc = "()" + (String) readableFields.get(fieldName);
    int read_method_index = cp.addMethodrefInfo(cp.getThisClassInfo(),
                                                EACH_READ_METHOD_PREFIX + fieldName, desc);
    iter.writeByte(Opcode.INVOKEVIRTUAL, pos);
    iter.write16bit(read_method_index, pos + 1);
    return pos;
  }
View Full Code Here

Examples of javassist.bytecode.ConstPool.addMethodrefInfo()

    String className = cp.getFieldrefClassName(index);
    if ( !filter.handleWriteAccess( className, fieldName ) ) {
      return pos;
    }
    String desc = "(" + cp.getFieldrefType( index ) + ")V";
    int write_method_index = cp.addMethodrefInfo(
        cp.getThisClassInfo(),
        EACH_WRITE_METHOD_PREFIX + fieldName,
        desc
    );
    iter.writeByte(Opcode.INVOKEVIRTUAL, pos);
View Full Code Here

Examples of javassist.bytecode.ConstPool.addMethodrefInfo()

              fieldName,
              methodName
          );

          if ( op == Opcode.GETFIELD ) {
            final int readMethodIndex = constPool.addMethodrefInfo(
                constPool.getThisClassInfo(),
                attributeDescriptor.getReader().getName(),
                attributeDescriptor.getReader().getSignature()
            );
            itr.writeByte( Opcode.INVOKESPECIAL, index );
View Full Code Here

Examples of javassist.bytecode.ConstPool.addMethodrefInfo()

            );
            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( readMethodIndex, index + 1 );
          }
          else {
            final int writeMethodIndex = constPool.addMethodrefInfo(
                constPool.getThisClassInfo(),
                attributeDescriptor.getWriter().getName(),
                attributeDescriptor.getWriter().getSignature()
            );
            itr.writeByte( Opcode.INVOKESPECIAL, index );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.