Package javassist.bytecode

Examples of javassist.bytecode.StackMapTable$SwitchShifter


    code.addOpcode( Opcode.ARETURN );
    getterMethodInfo.setCodeAttribute( code.toCodeAttribute() );
    getterMethodInfo.setAccessFlags( AccessFlag.PUBLIC );
    final CodeAttribute codeAttribute = getterMethodInfo.getCodeAttribute();
    if ( codeAttribute != null ) {
      final StackMapTable smt = MapMaker.make( classPool, getterMethodInfo );
      codeAttribute.setAttribute( smt );
    }
    classfile.addMethod( getterMethodInfo );
  }
View Full Code Here


    code.addOpcode( Opcode.RETURN );
    methodInfo.setCodeAttribute( code.toCodeAttribute() );
    methodInfo.setAccessFlags( AccessFlag.PUBLIC );
    final CodeAttribute codeAttribute = methodInfo.getCodeAttribute();
    if ( codeAttribute != null ) {
      final StackMapTable smt = MapMaker.make( classPool, methodInfo );
      codeAttribute.setAttribute( smt );
    }
    classfile.addMethod( methodInfo );
  }
View Full Code Here

    readMethodInfo.setCodeAttribute( code.toCodeAttribute() );
    readMethodInfo.setAccessFlags( AccessFlag.PUBLIC );
    final CodeAttribute codeAttribute = readMethodInfo.getCodeAttribute();
    if ( codeAttribute != null ) {
      final StackMapTable smt = MapMaker.make( classPool, readMethodInfo );
      codeAttribute.setAttribute( smt );
    }
    classfile.addMethod( readMethodInfo );
  }
View Full Code Here

    writeMethodInfo.setCodeAttribute( code.toCodeAttribute() );
    writeMethodInfo.setAccessFlags( AccessFlag.PUBLIC );
    final CodeAttribute codeAttribute = writeMethodInfo.getCodeAttribute();
    if ( codeAttribute != null ) {
      final StackMapTable smt = MapMaker.make( classPool, writeMethodInfo );
      codeAttribute.setAttribute( smt );
    }
    classfile.addMethod( writeMethodInfo );
  }
View Full Code Here

      while ( iter.hasNext() ) {
        int pos = iter.next();
        pos = transformInvokevirtualsIntoGetfields( classfile, iter, pos );
        transformInvokevirtualsIntoPutfields( classfile, iter, pos );
      }
      final StackMapTable smt = MapMaker.make( classPool, methodInfo );
      codeAttr.setAttribute( smt );
    }
  }
View Full Code Here

    final int targetTypeConstPoolIndex = constPool.addClassInfo( this.targetBean.getName() );
    final String desc = GET_SETTER_DESC;
    final MethodInfo setterMethodInfo = new MethodInfo( constPool, GENERATED_SETTER_NAME, desc );

    final Bytecode code = new Bytecode( constPool, 4, 6 );
    StackMapTable stackmap = null;
    /* | this | bean | args | i | raw bean | exception | */
    if ( setters.length > 0 ) {
      // required to exception table
      int start;
      int end;
View Full Code Here

            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( writeMethodIndex, index + 1 );
          }
        }

        final StackMapTable smt = MapMaker.make( classPool, methodInfo );
        methodInfo.getCodeAttribute().setAttribute( smt );
      }
      catch (BadBytecode e) {
        throw new EnhancementException(
            "Unable to perform field access transformation in method : " + methodName,
View Full Code Here

    int target_type_index = cp.addClassInfo( this.targetBean.getName() );
    String desc = GET_SETTER_DESC;
    MethodInfo mi = new MethodInfo( cp, GENERATED_SETTER_NAME, desc );

    Bytecode code = new Bytecode( cp, 4, 6 );
    StackMapTable stackmap = null;
    /* | this | bean | args | i | raw bean | exception | */
    if ( setters.length > 0 ) {
      int start, end; // required to exception table
      // iconst_0 // i
      code.addIconst( 0 );
View Full Code Here

    code.addOpcode(Opcode.ARETURN);
    minfo.setCodeAttribute(code.toCodeAttribute());
    minfo.setAccessFlags(AccessFlag.PUBLIC);
    CodeAttribute codeAttribute = minfo.getCodeAttribute();
    if (codeAttribute != null) {
      StackMapTable smt = MapMaker.make(classPool, minfo);
      codeAttribute.setAttribute(smt);
    }
    classfile.addMethod(minfo);
  }
View Full Code Here

    code.addOpcode(Opcode.RETURN);
    minfo.setCodeAttribute(code.toCodeAttribute());
    minfo.setAccessFlags(AccessFlag.PUBLIC);
    CodeAttribute codeAttribute = minfo.getCodeAttribute();
    if (codeAttribute != null) {
      StackMapTable smt = MapMaker.make(classPool, minfo);
      codeAttribute.setAttribute(smt);
    }
    classfile.addMethod(minfo);
  }
View Full Code Here

TOP

Related Classes of javassist.bytecode.StackMapTable$SwitchShifter

Copyright © 2018 www.massapicom. 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.