Package org.aspectj.weaver

Examples of org.aspectj.weaver.AjAttribute$WeaverState


    // FIXASC why going backwards? is it important
    for (int i = forSecondPass.size() - 1; i >= 0; i--) {
      Unknown a = forSecondPass.get(i);
      String name = a.getName();
      AjAttribute attr = AjAttribute.read(version, name, a.getBytes(), context, w, dataDecompressor);
      if (attr != null) {
        attributes.add(attr);
      }
    }
    return attributes;
View Full Code Here


      UnresolvedType[] paramTypes = new UnresolvedType[bindings.length];
      for (int i = 0; i < paramTypes.length; i++)
        paramTypes[i] = bindings[i].getType();
      ResolvedPointcutDefinition resPcutDef = new ResolvedPointcutDefinition(factory.fromBinding(((TypeDeclaration) typeStack
          .peek()).binding), 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(), -1, pointcutExpression.toCharArray(), pointcutExpression,
          new String[] { pEx.getMessage() });
View Full Code Here

    }
    if (memberTypes != null) {
      for (int i = 0; i < memberTypes.length; i++) {
        if (memberTypes[i] instanceof IntertypeMemberClassDeclaration) {
          IntertypeMemberClassDeclaration itdMemberClassDeclaration = (IntertypeMemberClassDeclaration) memberTypes[i];
          AjAttribute attribute = itdMemberClassDeclaration.getAttribute();
          if (attribute != null) {
            classFile.extraAttributes.add(new EclipseAttributeAdapter(attribute));
          }
        }
      }
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

   */
  private void resolveAnnotationDeclares(List<AjAttribute> attributeList) {
    FormalBinding[] bindings = new org.aspectj.weaver.patterns.FormalBinding[0];
    IScope bindingScope = new BindingScope(getResolvedTypeX(), getResolvedTypeX().getSourceContext(), bindings);
    for (Iterator<AjAttribute> iter = attributeList.iterator(); iter.hasNext();) {
      AjAttribute a = iter.next();
      if (a instanceof AjAttribute.DeclareAttribute) {
        Declare decl = (((AjAttribute.DeclareAttribute) a).getDeclare());
        if (decl instanceof DeclareErrorOrWarning) {
          decl.resolve(bindingScope);
        } else if (decl instanceof DeclarePrecedence) {
View Full Code Here

    // FIXASC why going backwards? is it important
    for (int i = forSecondPass.size() - 1; i >= 0; i--) {
      Unknown a = forSecondPass.get(i);
      String name = a.getName();
      AjAttribute attr = AjAttribute.read(version, name, a.getBytes(), context, w, dataDecompressor);
      if (attr != null) {
        attributes.add(attr);
      }
    }
    return attributes;
View Full Code Here

   */
  private void resolveAnnotationDeclares(List<AjAttribute> attributeList) {
    FormalBinding[] bindings = new org.aspectj.weaver.patterns.FormalBinding[0];
    IScope bindingScope = new BindingScope(getResolvedTypeX(), getResolvedTypeX().getSourceContext(), bindings);
    for (Iterator<AjAttribute> iter = attributeList.iterator(); iter.hasNext();) {
      AjAttribute a = iter.next();
      if (a instanceof AjAttribute.DeclareAttribute) {
        Declare decl = (((AjAttribute.DeclareAttribute) a).getDeclare());
        if (decl instanceof DeclareErrorOrWarning) {
          decl.resolve(bindingScope);
        } else if (decl instanceof DeclarePrecedence) {
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$WeaverState

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.