Package org.aspectj.apache.bcel.generic

Examples of org.aspectj.apache.bcel.generic.ObjectType


    // ENH 42737
    exceptionVar.appendStore(rtExHandler, fact);
    // aload_1
    rtExHandler.append(exceptionVar.createLoad(fact));
    // instanceof class java/lang/RuntimeException
    rtExHandler.append(fact.createInstanceOf(new ObjectType("java.lang.RuntimeException")));
    // ifeq go to new SOFT_EXCEPTION_TYPE instruction
    rtExHandler.append(InstructionFactory.createBranchInstruction(Constants.IFEQ, handler.getStart()));
    // aload_1
    rtExHandler.append(exceptionVar.createLoad(fact));
    // athrow
View Full Code Here


    String aspectname = munger.getConcreteAspect().getName();

    String ptwField = NameMangler.perTypeWithinFieldForTarget(munger.getConcreteAspect());
    entrySuccessInstructions.append(InstructionFactory.PUSH(fact.getConstantPool(), t.getName()));

    entrySuccessInstructions.append(fact.createInvoke(aspectname, "ajc$createAspectInstance", new ObjectType(aspectname),
        new Type[] { new ObjectType("java.lang.String") }, Constants.INVOKESTATIC));
    entrySuccessInstructions.append(fact.createPutStatic(t.getName(), ptwField, new ObjectType(aspectname)));

    entryInstructions.append(entrySuccessInstructions);

    range.insert(entryInstructions, Range.InsideBefore);
  }
View Full Code Here

    if (thisJoinPointVar != null) {
      arrayVar.appendConvertableArrayStore(il, fact, stateIndex, thisJoinPointVar);
      thisJoinPointVar.setPositionInAroundState(stateIndex);
      stateIndex++;
    }
    il.append(fact.createNew(new ObjectType(constructor.getDeclaringType().getName())));
    il.append(InstructionConstants.DUP);
    arrayVar.appendLoad(il, fact);
    il.append(Utility.createInvoke(fact, world, constructor));
    if (getKind() == PreInitialization) {
      il.append(InstructionConstants.DUP);
View Full Code Here

    Type jlClass = BcelWorld.makeBcelType(UnresolvedType.JL_CLASS);
    Type jlString = BcelWorld.makeBcelType(UnresolvedType.JL_STRING);
    Type jlClassArray = BcelWorld.makeBcelType(UnresolvedType.JAVA_LANG_CLASS_ARRAY);
    Type jlaAnnotation = BcelWorld.makeBcelType(UnresolvedType.JAVA_LANG_ANNOTATION);

    Instruction pushConstant = fact.createConstant(new ObjectType(toType.getName()));

    if (kind == Shadow.MethodCall || kind == Shadow.MethodExecution || kind == Shadow.PreInitialization
        || kind == Shadow.Initialization || kind == Shadow.ConstructorCall || kind == Shadow.ConstructorExecution
        || kind == Shadow.AdviceExecution ||
        // annotations for fieldset/fieldget when an ITD is involved are stored against a METHOD
View Full Code Here

    for (int i = 0; i < arrayEntries.length; i++) {
      il.append(InstructionFactory.createDup(1));
      il.append(fact.createConstant(Integer.valueOf(i)));
      switch (arrayEntries[i].getType()) {
      case Constants.T_ARRAY:
        il.append(fact.createConstant(new ObjectType(arrayEntries[i].getSignature()))); // FIXME should be getName() and not
        // getSignature()?
        break;
      case Constants.T_BOOLEAN:
        il.append(fact.createGetStatic("java/lang/Boolean", "TYPE", arrayElementType));
        break;
View Full Code Here

    il.append(factory.createNew(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName()));
    il.append(InstructionConstants.DUP);
    il.append(InstructionFactory.PUSH(classGen.getConstantPool(), aspectType.getName()));
    il.append(Utility.createGet(factory, AjcMemberMaker.initFailureCauseField(aspectType)));
    il.append(factory.createInvoke(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName(), "<init>", Type.VOID, new Type[] {
        Type.STRING, new ObjectType("java.lang.Throwable") }, Constants.INVOKESPECIAL));
    il.append(InstructionConstants.ATHROW);
    InstructionHandle ifElse = il.append(Utility.createGet(factory, AjcMemberMaker.perSingletonField(aspectType)));
    il.append(InstructionFactory.createReturn(Type.OBJECT));
    ifNotNull.setTarget(ifElse);
  }
View Full Code Here

      clinit.getBody().getEnd().getPrev().setInstruction(InstructionConstants.NOP);
    }
    clinit.getBody().getEnd().setInstruction(InstructionConstants.NOP);
    clinit.getBody().append(il);

    clinit.addExceptionHandler(tryStart, handler.getPrev(), handler, new ObjectType("java.lang.Throwable"), false);
  }
View Full Code Here

    il.append(factory.createNew(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName()));
    il.append(InstructionConstants.DUP);
    il.append(InstructionFactory.PUSH(classGen.getConstantPool(), aspectType.getName()));
    il.append(InstructionConstants.ACONST_NULL);
    il.append(factory.createInvoke(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName(), "<init>", Type.VOID, new Type[] {
        Type.STRING, new ObjectType("java.lang.Throwable") }, Constants.INVOKESPECIAL));
    il.append(InstructionConstants.ATHROW);
    InstructionHandle ifElse = il.append(InstructionConstants.ALOAD_1);
    ifNonNull.setTarget(ifElse);
    il.append(InstructionFactory.createReturn(Type.OBJECT));

    InstructionHandle handler = il.append(InstructionConstants.ASTORE_1);
    il.append(factory.createNew(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName()));
    il.append(InstructionConstants.DUP);
    il.append(factory.createInvoke(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION.getName(), "<init>", Type.VOID, Type.NO_ARGS,
        Constants.INVOKESPECIAL));
    il.append(InstructionConstants.ATHROW);

    method.addExceptionHandler(tryStart, handler.getPrev(), handler, new ObjectType("java.lang.Exception"), false);
  }
View Full Code Here

    InstructionHandle handler = il.append(InstructionConstants.ASTORE_1);
    il.append(InstructionConstants.ICONST_0);
    il.append(InstructionConstants.IRETURN);

    method.addExceptionHandler(tryStart, handler.getPrev(), handler, new ObjectType("java.lang.Exception"), false);
  }
View Full Code Here

    InstructionHandle handler = il.append(InstructionConstants.ASTORE_1);
    il.append(InstructionConstants.ACONST_NULL);
    il.append(InstructionConstants.ARETURN);

    method.addExceptionHandler(tryStart, handler.getPrev(), handler, new ObjectType("java.lang.Exception"), false);
  }
View Full Code Here

TOP

Related Classes of org.aspectj.apache.bcel.generic.ObjectType

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.