Package org.objectweb.asm.commons

Examples of org.objectweb.asm.commons.GeneratorAdapter.loadArg()


        mv.loadThis();
        mv.loadArg( 1 );
        mv.putField( classType(), PARENT_MEMBER_NAME, parentType() );
        // this.root = _parent.root();
        mv.loadThis();
        mv.loadArg( 1 );
        final Type rootType = rootSectionCompiler().classType();
        if (!(parentSectionCompiler() instanceof RootSectionCompiler)) {
          // parent.root is package visible
          mv.getField( parentType(), ROOT_MEMBER_NAME, rootType );
        }
View Full Code Here


        mv.putField( SubSectionCompiler.this.classType(), ROOT_MEMBER_NAME, rootType );

        // this.inputs = _inputs;
        if (hasInputs()) {
          mv.loadThis();
          mv.loadArg( 0 );
          storeInputs( mv );
        }

        //this.sectionInfo = new SectionInfoImpl(...);
        if (isComputationListenerEnabled()) {
View Full Code Here

        }

        //this.sectionInfo = new SectionInfoImpl(...);
        if (isComputationListenerEnabled()) {
          mv.loadThis();
          mv.loadArg( 2 ); //section index
          final ExpressionCompilerForNumbers c = numericCompiler();
          final SectionModel sectionModel = model();
          final RangeAddress range = (RangeAddress) model().getSource();
          final CellAddress topLeft = range.getTopLeft();
          final CellAddress bottomRight = range.getBottomRight();
View Full Code Here

    // Constructor(DelegatorContext)
    GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC, constructor, signature, null, classWriter);

    // super(context);
    mg.loadThis();
    mg.loadArg(0);
    mg.invokeConstructor(Type.getType(AbstractHttpHandlerDelegator.class),
                         Methods.getMethod(void.class, "<init>", DelegatorContext.class));
    mg.returnValue();
    mg.endMethod();
  }
View Full Code Here

    // Constructor(TypeToken<?> classType)
    GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC, getMethod(void.class, "<init>", TypeToken.class),
                                               null, new Type[0], classWriter);
    mg.loadThis();
    mg.loadArg(0);
    mg.invokeConstructor(Type.getType(AbstractFieldAccessor.class), getMethod(void.class, "<init>", TypeToken.class));
    if (isPrivate) {
      initializeReflectionField(mg, field);
    }
View Full Code Here

  private void directGetter(Field field) {
    GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC, getMethod(Object.class, "get", Object.class),
                                               getterSignature(), new Type[0], classWriter);
    // Simply access by field
    // return ((classType)object).fieldName;
    mg.loadArg(0);
    mg.checkCast(Type.getType(field.getDeclaringClass()));
    mg.getField(Type.getType(field.getDeclaringClass()), field.getName(), Type.getType(field.getType()));
    if (field.getType().isPrimitive()) {
      mg.valueOf(Type.getType(field.getType()));
    }
View Full Code Here

    GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC,
                                               getMethod(void.class, "set", Object.class, Object.class),
                                               setterSignature(), new Type[0], classWriter);
    // Simply access by field
    // ((classType)object).fieldName = (valueType)value;
    mg.loadArg(0);
    mg.checkCast(Type.getType(field.getDeclaringClass()));
    mg.loadArg(1);
    if (field.getType().isPrimitive()) {
      mg.unbox(Type.getType(field.getType()));
    } else {
View Full Code Here

                                               setterSignature(), new Type[0], classWriter);
    // Simply access by field
    // ((classType)object).fieldName = (valueType)value;
    mg.loadArg(0);
    mg.checkCast(Type.getType(field.getDeclaringClass()));
    mg.loadArg(1);
    if (field.getType().isPrimitive()) {
      mg.unbox(Type.getType(field.getType()));
    } else {
      mg.checkCast(Type.getType(field.getType()));
    }
View Full Code Here

    GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC, getMethod(field.getType(), methodName, Object.class),
                                               null, new Type[0], classWriter);
    if (isPrivate) {
      // get the value using the generic Object get(Object) method and unbox the value
      mg.loadThis();
      mg.loadArg(0);
      mg.invokeVirtual(Type.getObjectType(className), getMethod(Object.class, "get", Object.class));
      mg.unbox(Type.getType(field.getType()));
    } else {
      // Simply access the field.
      mg.loadArg(0);
View Full Code Here

      mg.loadArg(0);
      mg.invokeVirtual(Type.getObjectType(className), getMethod(Object.class, "get", Object.class));
      mg.unbox(Type.getType(field.getType()));
    } else {
      // Simply access the field.
      mg.loadArg(0);
      mg.checkCast(Type.getType(field.getDeclaringClass()));
      mg.getField(Type.getType(field.getDeclaringClass()), field.getName(), Type.getType(field.getType()));
    }
    mg.returnValue();
    mg.endMethod();
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.