Package org.aspectj.weaver.patterns

Examples of org.aspectj.weaver.patterns.AndPointcut


  public ShadowMunger concretize(ResolvedType fromType, World world, PerClause clause) {
    // assert !fromType.isAbstract();
    Pointcut p = pointcut.concretize(fromType, getDeclaringType(), signature.getArity(), this);
    if (clause != null) {
      Pointcut oldP = p;
      p = new AndPointcut(clause, p);
      p.copyLocationFrom(oldP);
      p.state = Pointcut.CONCRETE;

      // FIXME ? ATAJ copy unbound bindings to ignore
      p.m_ignoreUnboundBindingForNames = oldP.m_ignoreUnboundBindingForNames;
View Full Code Here


    }
    if (p instanceof ConcreteCflowPointcut) {
      return p;
    }
    if (p instanceof AndPointcut) {
      AndPointcut apc = (AndPointcut) p;
      Pointcut left = shareEntriesFromMap(apc.getLeft(), pcMap);
      Pointcut right = shareEntriesFromMap(apc.getRight(), pcMap);
      return new AndPointcut(left, right);
    } else if (p instanceof OrPointcut) {
      OrPointcut opc = (OrPointcut) p;
      Pointcut left = shareEntriesFromMap(opc.getLeft(), pcMap);
      Pointcut right = shareEntriesFromMap(opc.getRight(), pcMap);
      return new OrPointcut(left, right);
View Full Code Here

        if (!nnbp.getBindingAnnotationTypePatterns().isEmpty() && !nnbp.getBindingTypePatterns().isEmpty()) {
          raiseNegationBindingError(userPointcut);
        }
      }
    } else if (pc instanceof AndPointcut) {
      AndPointcut and = (AndPointcut) pc;
      validateSingleBranchRecursion(and.getLeft(), userPointcut, foundFormals, names, bindings);
      validateSingleBranchRecursion(and.getRight(), userPointcut, foundFormals, names, bindings);
    } else if (pc instanceof NameBindingPointcut) {
      List/* BindingTypePattern */btps = ((NameBindingPointcut) pc).getBindingTypePatterns();
      for (Iterator iter = btps.iterator(); iter.hasNext();) {
        BindingTypePattern btp = (BindingTypePattern) iter.next();
        int index = btp.getFormalIndex();
View Full Code Here

    }
    if (toLookFor.isInstance(toSearch)) {
      return toSearch;
    }
    if (toSearch instanceof AndPointcut) {
      AndPointcut apc = (AndPointcut) toSearch;
      Pointcut left = findFirstPointcutIn(apc.getLeft(), toLookFor);
      if (left != null) {
        return left;
      }
      return findFirstPointcutIn(apc.getRight(), toLookFor);
    }
    return null;
  }
View Full Code Here

      // some things cant be shared...
      if (p instanceof NameBindingPointcut) return p;
      if (p instanceof IfPointcut) return p;
      if (p instanceof ConcreteCflowPointcut) return p;
      if (p instanceof AndPointcut) {
        AndPointcut apc = (AndPointcut) p;
        Pointcut left = shareEntriesFromMap(apc.getLeft(),pcMap);
        Pointcut right = shareEntriesFromMap(apc.getRight(),pcMap);
        return new AndPointcut(left,right);
      } else if (p instanceof OrPointcut) {
        OrPointcut opc = (OrPointcut) p;
        Pointcut left = shareEntriesFromMap(opc.getLeft(),pcMap);
        Pointcut right = shareEntriesFromMap(opc.getRight(),pcMap);
        return new OrPointcut(left,right);
View Full Code Here

          NameBindingPointcut nnbp = (NameBindingPointcut) not.getNegatedPointcut();
          if (!nnbp.getBindingAnnotationTypePatterns().isEmpty() && !nnbp.getBindingTypePatterns().isEmpty())
            raiseNegationBindingError(userPointcut);
        }
      } else if (pc instanceof AndPointcut) {
        AndPointcut and = (AndPointcut) pc;
        validateSingleBranchRecursion(and.getLeft(), userPointcut,foundFormals,names,bindings);
        validateSingleBranchRecursion(and.getRight(),userPointcut,foundFormals,names,bindings);
      } else if (pc instanceof NameBindingPointcut) {
        List/*BindingTypePattern*/ btps = ((NameBindingPointcut)pc).getBindingTypePatterns();
        for (Iterator iter = btps.iterator(); iter.hasNext();) {
        BindingTypePattern btp = (BindingTypePattern) iter.next();
        int index = btp.getFormalIndex();
View Full Code Here

   
    private Pointcut findFirstPointcutIn(Pointcut toSearch, Class toLookFor) {
      if (toSearch instanceof NotPointcut) return null;
      if (toLookFor.isInstance(toSearch)) return toSearch;
      if (toSearch instanceof AndPointcut) {
        AndPointcut apc = (AndPointcut) toSearch;
        Pointcut left = findFirstPointcutIn(apc.getLeft(),toLookFor);
        if (left != null) return left;
        return findFirstPointcutIn(apc.getRight(),toLookFor);
      }
      return null;
    }
View Full Code Here

      if (ad.pointcutDesignator != null) { 
        if (ad.pointcutDesignator.getPointcut() instanceof ReferencePointcut) {
          ReferencePointcut rp = (ReferencePointcut)ad.pointcutDesignator.getPointcut();
          details += rp.name + "..";
        } else if (ad.pointcutDesignator.getPointcut() instanceof AndPointcut) {
          AndPointcut ap = (AndPointcut)ad.pointcutDesignator.getPointcut();
          if (ap.getLeft() instanceof ReferencePointcut) {
            details += ap.getLeft().toString() + ".."
          } else {
            details += POINTCUT_ANONYMOUS + "..";
          }
        } else if (ad.pointcutDesignator.getPointcut() instanceof OrPointcut) {
          OrPointcut op = (OrPointcut)ad.pointcutDesignator.getPointcut();
View Full Code Here

    public ShadowMunger concretize(ResolvedType fromType, World world, PerClause clause) {
      // assert !fromType.isAbstract();
        Pointcut p = pointcut.concretize(fromType, getDeclaringType(), signature.getArity(), this);
        if (clause != null) {
          Pointcut oldP = p;
          p = new AndPointcut(clause, p);
          p.copyLocationFrom(oldP);
          p.state = Pointcut.CONCRETE;

            //FIXME ? ATAJ copy unbound bindings to ignore
            p.m_ignoreUnboundBindingForNames  =oldP.m_ignoreUnboundBindingForNames;
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.patterns.AndPointcut

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.