Package org.aspectj.weaver.bcel

Examples of org.aspectj.weaver.bcel.BcelAnnotation


      SimpleElementValue svg = new SimpleElementValue(ElementValue.STRING, cg.getConstantPool(), abstractPc.expression);
      List elems = new ArrayList();
      elems.add(new NameValuePair("value", svg, cg.getConstantPool()));
      AnnotationGen mag = new AnnotationGen(new ObjectType("org/aspectj/lang/annotation/Pointcut"), elems, true, cg
          .getConstantPool());
      AnnotationAJ max = new BcelAnnotation(mag, world);
      mg.addAnnotation(max);

      InstructionList body = mg.getBody();
      body.append(InstructionConstants.RETURN);
      cg.addMethodGen(mg);
View Full Code Here


      if (giveupnow) {
        CompilationAndWeavingContext.leavingPhase(tok);
        return false;
      }

      theTargetType.addAnnotation(new BcelAnnotation(new FakeAnnotation(name, sig,
          (abits & TagBits.AnnotationRuntimeRetention) != 0), factory.getWorld()));
      CompilationAndWeavingContext.leavingPhase(tok);
      return true;
    }
View Full Code Here

      SimpleElementValue svg = new SimpleElementValue(ElementValue.STRING, cg.getConstantPool(), abstractPc.expression);
      List<NameValuePair> elems = new ArrayList<NameValuePair>();
      elems.add(new NameValuePair("value", svg, cg.getConstantPool()));
      AnnotationGen mag = new AnnotationGen(new ObjectType("org/aspectj/lang/annotation/Pointcut"), elems, true,
          cg.getConstantPool());
      AnnotationAJ max = new BcelAnnotation(mag, world);
      mg.addAnnotation(max);

      InstructionList body = mg.getBody();
      body.append(InstructionConstants.RETURN);
      cg.addMethodGen(mg);
View Full Code Here

    SimpleElementValue svg = new SimpleElementValue(ElementValue.STRING, cg.getConstantPool(), paa.pointcut);
    List<NameValuePair> elems = new ArrayList<NameValuePair>();
    elems.add(new NameValuePair("value", svg, cg.getConstantPool()));
    AnnotationGen mag = new AnnotationGen(new ObjectType("org/aspectj/lang/annotation/" + paa.adviceKind.toString()), elems,
        true, cg.getConstantPool());
    AnnotationAJ aaj = new BcelAnnotation(mag, world);
    return aaj;
  }
View Full Code Here

      if (anns == null)
        anns = new org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[0];
      // convert to our Annotation type
      for (int i = 0; i < anns.length; i++) {
        if (anns[i].getTypeSignature().equals(ofType.getSignature())) {
          return new BcelAnnotation(anns[i], world);
        }
      }
      return null;
    } catch (ClassNotFoundException cnfEx) {
      // just use reflection then
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.bcel.BcelAnnotation

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.