Package org.aspectj.weaver

Examples of org.aspectj.weaver.AjAttribute$Aspect



    private AjAttribute.Aspect processAttributes(List attributeList, List pointcuts, boolean fromAnnotations) {
      AjAttribute.Aspect deferredAspectAttribute = null;
    for (Iterator iter = attributeList.iterator(); iter.hasNext();) {
      AjAttribute a = (AjAttribute) iter.next();
      //System.err.println("unpacking: " + this + " and " + a);
      if (a instanceof AjAttribute.Aspect) {
        if (fromAnnotations) {
          deferredAspectAttribute = (AjAttribute.Aspect) a;
        } else {
View Full Code Here


    }
       
    for (int i = forSecondPass.size()-1; i >= 0; i--) {
      Unknown a = (Unknown)forSecondPass.get(i);
      String name = a.getName();
      AjAttribute attr = AjAttribute.read(version,name,a.getBytes(),context,msgHandler);
      if (attr!=null) l.add(attr);
    }
    return l;
  }
View Full Code Here

            methodDeclaration.modifiers,
            "anonymous",
            paramTypes,
            pc
        );
      AjAttribute attr = new AjAttribute.PointcutDeclarationAttribute(resPcutDef);
      ((AjMethodDeclaration)methodDeclaration).addAttribute(new EclipseAttributeAdapter(attr));
    } catch(ParserException pEx) {
      methodDeclaration.scope.problemReporter().parseError(
          pcLocation[0] + pEx.getLocation().getStart(),
          pcLocation[0] + pEx.getLocation().getEnd() ,
View Full Code Here

    processAttributes(world,as);
  }

  private void processAttributes(World world, List as) {
    for (Iterator iter = as.iterator(); iter.hasNext();) {
      AjAttribute a = (AjAttribute) iter.next();
      if (a instanceof AjAttribute.MethodDeclarationLineNumberAttribute) {
        declarationLineNumber = (AjAttribute.MethodDeclarationLineNumberAttribute)a;
      } else if (a instanceof AjAttribute.AdviceAttribute) {
        associatedShadowMunger = ((AjAttribute.AdviceAttribute)a).reify(this, world);
        // return;
View Full Code Here

    Attribute[] attrs = field.getAttributes();
        List as = BcelAttributes.readAjAttributes(getDeclaringType().getClassName(),attrs, getSourceContext(world),world.getMessageHandler(),bcelObjectType.getWeaverVersionAttribute());
        as.addAll(AtAjAttributes.readAj5FieldAttributes(field, this, world.resolve(getDeclaringType()), getSourceContext(world), world.getMessageHandler()));

    for (Iterator iter = as.iterator(); iter.hasNext();) {
      AjAttribute a = (AjAttribute) iter.next();
      if (a instanceof AjAttribute.AjSynthetic) {
        isAjSynthetic = true;
      } else {
        throw new BCException("weird field attribute " + a);
      }
View Full Code Here

        }

        aspectDef.setAspectModel(getAspectModelType());

        for (Iterator it = attributes.iterator(); it.hasNext();) {
            AjAttribute attr = (AjAttribute) it.next();
            if (attr instanceof AjAttribute.PointcutDeclarationAttribute) {
                AjAttribute.PointcutDeclarationAttribute pcAttr = (AjAttribute.PointcutDeclarationAttribute) attr;
                Pointcut pointcut = pcAttr.reify().getPointcut();
                if (pointcut instanceof KindedPointcut) {
                    try {
View Full Code Here

                                        final Method method) {
        Attribute[] attributes = method.getAttributes();
        List ajAttributes = readAjAttributes(attributes, null);
        AdviceInfo adviceInfo = new AdviceInfo();
        for (Iterator it = ajAttributes.iterator(); it.hasNext();) {
            AjAttribute attr = (AjAttribute) it.next();
            if (attr instanceof AjAttribute.AdviceAttribute) {
                AjAttribute.AdviceAttribute adviceAttr = (AjAttribute.AdviceAttribute) attr;
                adviceInfo.type = adviceType;
                adviceInfo.aspectClassName = javaClassfinal.getClassName().replace('.', '/');
                adviceInfo.adviceMethodName = method.getName();
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.AjAttribute$Aspect

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.