Package org.aspectj.weaver.patterns

Examples of org.aspectj.weaver.patterns.OrPointcut


  // the effects of itds (on within for example), interfaces, the fact that
  // join points can have multiple signatures and so on.
  private boolean couldEverMatchSameJoinPoints(Pointcut left, Pointcut right) {

    if (left instanceof OrPointcut) {
      OrPointcut leftOrPointcut = (OrPointcut) left;
      if (couldEverMatchSameJoinPoints(leftOrPointcut.getLeft(), right)) {
        return true;
      }
      if (couldEverMatchSameJoinPoints(leftOrPointcut.getRight(), right)) {
        return true;
      }
      return false;
    }

    if (right instanceof OrPointcut) {
      OrPointcut rightOrPointcut = (OrPointcut) right;
      if (couldEverMatchSameJoinPoints(left, rightOrPointcut.getLeft())) {
        return true;
      }
      if (couldEverMatchSameJoinPoints(left, rightOrPointcut.getRight())) {
        return true;
      }
      return false;
    }
View Full Code Here


        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);
      } else if (p instanceof NotPointcut) {
        NotPointcut npc = (NotPointcut) p;
        Pointcut not = shareEntriesFromMap(npc.getNegatedPointcut(),pcMap);
        return new NotPointcut(not);
      } else {
View Full Code Here

    // common.
    private void validateBindings(Pointcut dnfPointcut, Pointcut userPointcut, int numFormals, String[] names) {
      if (numFormals == 0) return; // nothing to check
      if (dnfPointcut.couldMatchKinds().isEmpty()) return; // cant have problems if you dont match!
      if (dnfPointcut instanceof OrPointcut) {
        OrPointcut orBasedDNFPointcut = (OrPointcut) dnfPointcut;
        Pointcut[] leftBindings = new Pointcut[numFormals];
        Pointcut[] rightBindings = new Pointcut[numFormals];
        validateOrBranch(orBasedDNFPointcut,userPointcut,numFormals,names,leftBindings,rightBindings);
      } else {
        Pointcut[] bindings = new Pointcut[numFormals];
View Full Code Here

    // the effects of itds (on within for example), interfaces, the fact that
    // join points can have multiple signatures and so on.
    private boolean couldEverMatchSameJoinPoints(Pointcut left, Pointcut right) {
     
      if (left instanceof OrPointcut) {
        OrPointcut leftOrPointcut = (OrPointcut)left;
        if (couldEverMatchSameJoinPoints(leftOrPointcut.getLeft(),right)) return true;
        if (couldEverMatchSameJoinPoints(leftOrPointcut.getRight(),right)) return true;
        return false;
      }
     
      if (right instanceof OrPointcut) {
        OrPointcut rightOrPointcut = (OrPointcut)right;
        if (couldEverMatchSameJoinPoints(left,rightOrPointcut.getLeft())) return true;
        if (couldEverMatchSameJoinPoints(left,rightOrPointcut.getRight())) return true;
        return false;
      }

      // look for withins
      WithinPointcut leftWithin = (WithinPointcut) findFirstPointcutIn(left,WithinPointcut.class);
View Full Code Here

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

TOP

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

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.