Package org.aspectj.apache.bcel.generic

Examples of org.aspectj.apache.bcel.generic.InstructionFactory.createNew()


        flagAsSynthetic(method, true);
        classGen.addMethodGen(method);

        InstructionList il = method.getBody();
        il.append(Utility.createGet(factory, AjcMemberMaker.perCflowField(aspectType)));
        il.append(factory.createNew(aspectType.getName()));
        il.append(InstructionConstants.DUP);
        il.append(factory.createInvoke(aspectType.getName(), "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
        il.append(Utility.createInvoke(factory, Constants.INVOKEVIRTUAL, AjcMemberMaker.cflowStackPushInstance()));
        il.append(InstructionFactory.createReturn(Type.VOID));
    }
View Full Code Here


    private InstructionList initializeAllTjps() {
      InstructionList list = new InstructionList();
      InstructionFactory fact = getFactory();
     
      // make a new factory
      list.append(fact.createNew(factoryType));
      list.append(InstructionFactory.createDup(1));
     
      list.append(new PUSH(getConstantPoolGen(), getFileName()));
     
      // load the current Class object
View Full Code Here

      // Something like: "ajc$cflowCounter$0 = new CflowCounter();"
    LazyMethodGen clinit = gen.getAjcPreClinit(); //StaticInitializer();
    InstructionList setup = new InstructionList();
    InstructionFactory fact = gen.getFactory();

    setup.append(fact.createNew(new ObjectType(NameMangler.CFLOW_COUNTER_TYPE)));
    setup.append(InstructionFactory.createDup(1));
    setup.append(fact.createInvoke(
      NameMangler.CFLOW_COUNTER_TYPE,
      "<init>",
      Type.VOID,
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.