Package org.aspectj.weaver.patterns

Examples of org.aspectj.weaver.patterns.OrPointcut


      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


    }
    if (dnfPointcut.couldMatchKinds() == Shadow.NO_SHADOW_KINDS_BITS) {
      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;
    }
View Full Code Here

    } 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

      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

    }
    if (dnfPointcut.couldMatchKinds() == Shadow.NO_SHADOW_KINDS_BITS) {
      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;
    }
View Full Code Here

        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;
      if (op.getLeft() instanceof ReferencePointcut) {
        details.append(op.getLeft().toString()).append(DOUBLE_DOTS);
      } else {
        details.append(POINTCUT_ANONYMOUS).append(DOUBLE_DOTS);
      }
    } else {
      details.append(POINTCUT_ANONYMOUS);
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

    }
    if (dnfPointcut.couldMatchKinds() == Shadow.NO_SHADOW_KINDS_BITS) {
      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

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.