Package org.aspectj.weaver.patterns

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


            // lets have another go with any remaining ones
            List<DeclareAnnotation> forRemoval = new ArrayList<DeclareAnnotation>();
            for (Iterator<DeclareAnnotation> iter = worthRetrying.iterator(); iter.hasNext();) {
              DeclareAnnotation decaF = iter.next();

              if (decaF.matches(field, world)) {
                if (decaF.isRemover()) {
                  AnnotationAJ annotation = decaF.getAnnotation();
                  if (field.hasAnnotation(annotation.getType())) {
                    // something to remove
                    typeIsChanged = modificationOccured = true;
View Full Code Here


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

      boolean modificationOccured = false;

      for (Iterator<DeclareAnnotation> iter2 = decaFs.iterator(); iter2.hasNext();) {
        DeclareAnnotation decaF = 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.getAnnotation());
View Full Code Here

      while (!worthRetrying.isEmpty() && modificationOccured) {
        modificationOccured = false;
        List<DeclareAnnotation> forRemoval = new ArrayList<DeclareAnnotation>();
        for (Iterator<DeclareAnnotation> iter2 = worthRetrying.iterator(); iter2.hasNext();) {
          DeclareAnnotation decaF = 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.getAnnotation());
View Full Code Here

      List<DeclareAnnotation> worthRetrying = new ArrayList<DeclareAnnotation>();
      boolean modificationOccured = false;

      for (Iterator<DeclareAnnotation> iter2 = decaMCs.iterator(); iter2.hasNext();) {
        DeclareAnnotation decaMC = iter2.next();
        if (decaMC.matches(unMangledInterMethod, world)) {
          LazyMethodGen annotationHolder = locateAnnotationHolderForMethodCtorMunger(clazz, methodctorMunger);
          if (annotationHolder == null
              || doesAlreadyHaveAnnotation(annotationHolder, unMangledInterMethod, decaMC, reportedErrors)) {
            continue; // skip this one...
          }
View Full Code Here

      while (!worthRetrying.isEmpty() && modificationOccured) {
        modificationOccured = false;
        List<DeclareAnnotation> forRemoval = new ArrayList<DeclareAnnotation>();
        for (Iterator<DeclareAnnotation> iter2 = worthRetrying.iterator(); iter2.hasNext();) {
          DeclareAnnotation decaMC = 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.getAnnotation());
View Full Code Here

            modificationOccured = false;
            // lets have another go
            List<DeclareAnnotation> forRemoval = new ArrayList<DeclareAnnotation>();
            for (Iterator<DeclareAnnotation> iter = worthRetrying.iterator(); iter.hasNext();) {
              DeclareAnnotation decaF = 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
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.getAnnotation());
        }
      }
    }
View Full Code Here

              boolean modificationOccured = false;
             
              for (Iterator iter = decaMs.iterator(); iter.hasNext();) {
                DeclareAnnotation decaM = (DeclareAnnotation) iter.next();
               
                if (decaM.matches(mg.getMemberView(),world)) {
                  if (doesAlreadyHaveAnnotation(mg.getMemberView(),decaM,reportedProblems)) {
                    // remove the declare @method since don't want an error when
                    // the annotation is already there
                    unusedDecams.remove(decaM);
                    continue; // skip this one...
View Full Code Here

                modificationOccured = false;
                // lets have another go
                List forRemoval = new ArrayList();
                for (Iterator iter = worthRetrying.iterator(); iter.hasNext();) {
                  DeclareAnnotation decaM = (DeclareAnnotation) iter.next();
                  if (decaM.matches(mg.getMemberView(),world)) {
                    if (doesAlreadyHaveAnnotation(mg.getMemberView(),decaM,reportedProblems)) {
                      // remove the declare @method since don't want an error when
                        // the annotation is already there
                        unusedDecams.remove(decaM);
                      continue; // skip this one...
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.