Package org.aspectj.weaver.patterns

Examples of org.aspectj.weaver.patterns.DeclareAnnotation.matches()


      boolean modificationOccured = false;
     
      for (Iterator iter2 = decaFs.iterator(); iter2.hasNext();) {
        DeclareAnnotation decaF = (DeclareAnnotation) iter2.next();
       
        if (decaF.matches(itdIsActually,world)) {
          LazyMethodGen annotationHolder = locateAnnotationHolderForFieldMunger(clazz,fieldMunger);
          if (doesAlreadyHaveAnnotation(annotationHolder,itdIsActually,decaF,reportedErrors)) continue; // skip this one...
          annotationHolder.addAnnotation(decaF.getAnnotationX());
          AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaF.getSourceLocation(),itdIsActually.getSourceLocation());
          isChanged = true;
View Full Code Here


        while (!worthRetrying.isEmpty() && modificationOccured) {
        modificationOccured = false;
                List forRemoval = new ArrayList();
                for (Iterator iter2 = worthRetrying.iterator(); iter.hasNext();) {
          DeclareAnnotation decaF = (DeclareAnnotation) iter2.next();
          if (decaF.matches(itdIsActually,world)) {
          LazyMethodGen annotationHolder = locateAnnotationHolderForFieldMunger(clazz,fieldMunger);
          if (doesAlreadyHaveAnnotation(annotationHolder,itdIsActually,decaF,reportedErrors)) continue; // skip this one...
          annotationHolder.addAnnotation(decaF.getAnnotationX());
          AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaF.getSourceLocation(),itdIsActually.getSourceLocation());
          isChanged = true;
View Full Code Here

      List worthRetrying = new ArrayList();
      boolean modificationOccured = false;
     
      for (Iterator iter2 = decaMCs.iterator(); iter2.hasNext();) {
        DeclareAnnotation decaMC = (DeclareAnnotation) iter2.next();
        if (decaMC.matches(unMangledInterMethod,world)) {
          LazyMethodGen annotationHolder = locateAnnotationHolderForMethodCtorMunger(clazz,methodctorMunger);
          if (annotationHolder == null || doesAlreadyHaveAnnotation(annotationHolder,unMangledInterMethod,decaMC,reportedErrors)){
            continue; // skip this one...
          }
          annotationHolder.addAnnotation(decaMC.getAnnotationX());
View Full Code Here

        while (!worthRetrying.isEmpty() && modificationOccured) {
        modificationOccured = false;
                List forRemoval = new ArrayList();
                for (Iterator iter2 = worthRetrying.iterator(); iter.hasNext();) {
          DeclareAnnotation decaMC = (DeclareAnnotation) iter2.next();
          if (decaMC.matches(unMangledInterMethod,world)) {
          LazyMethodGen annotationHolder = locateAnnotationHolderForFieldMunger(clazz,methodctorMunger);
          if (doesAlreadyHaveAnnotation(annotationHolder,unMangledInterMethod,decaMC,reportedErrors)) continue; // skip this one...
          annotationHolder.addAnnotation(decaMC.getAnnotationX());
          unMangledInterMethod.addAnnotation(decaMC.getAnnotationX());
          AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaMC.getSourceLocation(),unMangledInterMethod.getSourceLocation());
View Full Code Here

            Annotation [] dontAddMeTwice = fields[fieldCounter].getAnnotations();
           
            // go through all the declare @field statements
            for (Iterator iter = decaFs.iterator(); iter.hasNext();) {
        DeclareAnnotation decaF = (DeclareAnnotation) iter.next();
        if (decaF.matches(aBcelField,world)) {
         
          if (!dontAddTwice(decaF,dontAddMeTwice)){
            if (doesAlreadyHaveAnnotation(aBcelField,decaF,reportedProblems)){
                    // remove the declare @field since don't want an error when
                    // the annotation is already there
View Full Code Here

              modificationOccured = false;
              // lets have another go
              List forRemoval = new ArrayList();
              for (Iterator iter = worthRetrying.iterator(); iter.hasNext();) {
        DeclareAnnotation decaF = (DeclareAnnotation) iter.next();
        if (decaF.matches(aBcelField,world)) {
          // below code is for recursive things
          if (doesAlreadyHaveAnnotation(aBcelField,decaF,reportedProblems)) {
                // remove the declare @field since don't want an error when
                // the annotation is already there
                unusedDecafs.remove(decaF);
View Full Code Here

        // case where an aspect declares an annotation
        // on an ITD it declared on itself.
        List allDecams = weaver.getWorld().getDeclareAnnotationOnMethods();
        for (Iterator i = allDecams.iterator(); i.hasNext();){
          DeclareAnnotation decaMC = (DeclareAnnotation) i.next()
          if (decaMC.matches(unMangledInterMethod,weaver.getWorld())
              && newMethod.getEnclosingClass().getType() == aspectType) {
            newMethod.addAnnotation(decaMC.getAnnotationX());
          }
        }
      }
View Full Code Here

      // case where an aspect declares an annotation
      // on an ITD it declared on itself.
      List allDecams = weaver.getWorld().getDeclareAnnotationOnMethods();
      for (Iterator i = allDecams.iterator(); i.hasNext();){
        DeclareAnnotation decaMC = (DeclareAnnotation) i.next()
        if (decaMC.matches(explicitConstructor,weaver.getWorld())
            && mg.getEnclosingClass().getType() == aspectType) {
          mg.addAnnotation(decaMC.getAnnotationX());
        }
      }
    }
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.