Package org.objectweb.asm.commons

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


        }

        // Write the arguments name.
        if (hasArgumentLabels) {
            for (LocalVariableNode var : localVariables) {
                mv.visitLocalVariable(var.name, var.desc, var.signature, start, end, var.index);
            }
        }

        mv.visitMaxs(0, 0);
        mv.visitEnd();
View Full Code Here


         // Add local variables for the arguments.
        for (Map.Entry<Integer, LocalVariableNode> local : locals.entrySet()) {
            // Write the parameter name. Only write the local variable that are either `this` or parameters from the
            // initial descriptor.
            if (local.getValue().index <= Type.getArgumentTypes(descriptor).length) {
                mv.visitLocalVariable(local.getValue().name, local.getValue().desc, local.getValue().signature, start,stop,
                        local.getValue().index);
            }
        }

         mv.visitMaxs(0, 0);
View Full Code Here

        }

        // Write the arguments name.
        if (hasArgumentLabels) {
            for (LocalVariableNode var : localVariables) {
                mv.visitLocalVariable(var.name, var.desc, var.signature, start, end, var.index);
            }
        }

        mv.visitMaxs(0, 0);
        mv.visitEnd();
View Full Code Here

        mgen.returnValue();
        final Label end = mgen.mark();

        // declare local vars
        mgen.visitLocalVariable("this", action.getDescriptor(), null, begin, end, 0);
        arg = 1;
        for (final Field field : fields) {
            mgen.visitLocalVariable("arg" + arg, field.type.getDescriptor(), null, begin, end, arg++);
        }
        mgen.endMethod();
View Full Code Here

        // declare local vars
        mgen.visitLocalVariable("this", action.getDescriptor(), null, begin, end, 0);
        arg = 1;
        for (final Field field : fields) {
            mgen.visitLocalVariable("arg" + arg, field.type.getDescriptor(), null, begin, end, arg++);
        }
        mgen.endMethod();
    }

    /**
 
View Full Code Here

    adapter.ifZCmp(Opcodes.IFNE, l3);
   
    adapter.visitLabel(lend);

    adapter.visitLocalVariable("i", "I", null, l1, lend, i);

  }
 

  /**
 
View Full Code Here

      adapter.visitFieldInsn(Opcodes.GETFIELD, classType, name, type.toString());
      adapter.returnValue();
     
      Label end = new Label();
      adapter.visitLabel(end);
      adapter.visitLocalVariable("this", "L"+classType+";", null, start, end, 0);
      adapter.visitEnd();
     
      adapter.endMethod();
     
     
View Full Code Here

            adapter.visitFieldInsn(Opcodes.PUTFIELD, classType, name, type.toString());
     
      adapter.visitInsn(Opcodes.RETURN);
      end = new Label();
      adapter.visitLabel(end);
      adapter.visitLocalVariable("this", "L"+classType+";", null, start, end, 0);
      adapter.visitLocalVariable(name, type.toString(), null, start, end, 1);
      //adapter.visitMaxs(0, 0);//.visitMaxs(sizeOf+1, sizeOf+1);// hansx
      adapter.visitEnd();
       
      adapter.endMethod();
View Full Code Here

     
      adapter.visitInsn(Opcodes.RETURN);
      end = new Label();
      adapter.visitLabel(end);
      adapter.visitLocalVariable("this", "L"+classType+";", null, start, end, 0);
      adapter.visitLocalVariable(name, type.toString(), null, start, end, 1);
      //adapter.visitMaxs(0, 0);//.visitMaxs(sizeOf+1, sizeOf+1);// hansx
      adapter.visitEnd();
       
      adapter.endMethod();
     
View Full Code Here

    final GeneratorAdapter adapter = new GeneratorAdapter(Opcodes.ACC_PUBLIC+Opcodes.ACC_FINAL , INIT_COMPONENT, null, new Type[]{Types.PAGE_EXCEPTION}, cw);
        BytecodeContext bc=new BytecodeContext(null,statConstr, constr,this,keys,cw,name,adapter,INIT_COMPONENT,writeLog(),supressWSbeforeArg);
    Label methodBegin=new Label();
      Label methodEnd=new Label();

    adapter.visitLocalVariable("this", "L"+name+";", null, methodBegin, methodEnd, 0);
      adapter.visitLabel(methodBegin);
       
    // Scope oldData=null;
    final int oldData=adapter.newLocal(Types.VARIABLES);
    ASMConstants.NULL(adapter);
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.