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 (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 (pointcut instanceof ReferencePointcut) {
      ReferencePointcut rp = (ReferencePointcut) pointcut;
      pointcuts.add(rp);
    } else if (pointcut instanceof AndPointcut) {
      AndPointcut ap = (AndPointcut) pointcut;
      addAllNamed(ap.getLeft(), pointcuts);
      addAllNamed(ap.getRight(), pointcuts);
    } else if (pointcut instanceof OrPointcut) {
      OrPointcut op = (OrPointcut) pointcut;
      addAllNamed(op.getLeft(), pointcuts);
      addAllNamed(op.getRight(), pointcuts);
    }
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 (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

  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

    StringBuffer details = new StringBuffer();
    if (pcd instanceof ReferencePointcut) {
      ReferencePointcut rp = (ReferencePointcut) pcd;
      details.append(rp.name).append(DOUBLE_DOTS);
    } else if (pcd instanceof AndPointcut) {
      AndPointcut ap = (AndPointcut) pcd;
      if (ap.getLeft() instanceof ReferencePointcut) {
        details.append(ap.getLeft().toString()).append(DOUBLE_DOTS);
      } else {
        details.append(POINTCUT_ANONYMOUS).append(DOUBLE_DOTS);
      }
    } else if (pcd instanceof OrPointcut) {
      OrPointcut op = (OrPointcut) pcd;
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.