Package org.aspectj.weaver.tools

Examples of org.aspectj.weaver.tools.JoinPointMatch


    if (!(mi instanceof ProxyMethodInvocation)) {
      throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);
    }
    ProxyMethodInvocation pmi = (ProxyMethodInvocation) mi;
    ProceedingJoinPoint pjp = lazyGetProceedingJoinPoint(pmi);
    JoinPointMatch jpm = getJoinPointMatch(pmi);
    return invokeAdviceMethod(pjp, jpm, null, null);
  }
View Full Code Here


      // No current invocation...
      // TODO: Should we really proceed here?
      logger.debug("Couldn't access current invocation - matching with limited context: " + ex);
    }

    JoinPointMatch joinPointMatch = shadowMatch.matchesJoinPoint(thisObject, targetObject, args);

    /*
     * Do a final check to see if any this(TYPE) kind of residue match. For
     * this purpose, we use the original method's (proxy method's) shadow to
     * ensure that 'this' is correctly checked against. Without this check,
     * we get incorrect match on this(TYPE) where TYPE matches the target
     * type but not 'this' (as would be the case of JDK dynamic proxies).
     * <p>See SPR-2979 for the original bug.
     */
    if (pmi != null) {  // there is a current invocation
      RuntimeTestWalker originalMethodResidueTest = new RuntimeTestWalker(originalShadowMatch);
      if (!originalMethodResidueTest.testThisInstanceOfResidue(thisObject.getClass())) {
        return false;
      }
    }
    if (joinPointMatch.matches() && pmi != null) {
      bindParameters(pmi, joinPointMatch);
    }
    return joinPointMatch.matches();
  }
View Full Code Here

      // No current invocation...
      // TODO: Should we really proceed here?
      logger.debug("Couldn't access current invocation - matching with limited context: " + ex);
    }

    JoinPointMatch joinPointMatch = shadowMatch.matchesJoinPoint(thisObject, targetObject, args);

    /*
     * Do a final check to see if any this(TYPE) kind of residue match. For
     * this purpose, we use the original method's (proxy method's) shadow to
     * ensure that 'this' is correctly checked against. Without this check,
     * we get incorrect match on this(TYPE) where TYPE matches the target
     * type but not 'this' (as would be the case of JDK dynamic proxies).
     * <p>See SPR-2979 for the original bug.
     */
    if (pmi != null) {  // there is a current invocation
      RuntimeTestWalker originalMethodResidueTest = new RuntimeTestWalker(originalShadowMatch);
      if (!originalMethodResidueTest.testThisInstanceOfResidue(thisObject.getClass())) {
        return false;
      }
    }
    if (joinPointMatch.matches() && pmi != null) {
      bindParameters(pmi, joinPointMatch);
    }
    return joinPointMatch.matches();
  }
View Full Code Here

    if (!(mi instanceof ProxyMethodInvocation)) {
      throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);
    }
    ProxyMethodInvocation pmi = (ProxyMethodInvocation) mi;
    ProceedingJoinPoint pjp = lazyGetProceedingJoinPoint(pmi);
    JoinPointMatch jpm = getJoinPointMatch(pmi);
    return invokeAdviceMethod(pjp, jpm, null, null);
  }
View Full Code Here

      // No current invocation...
      // TODO: Should we really proceed here?
      logger.debug("Couldn't access current invocation - matching with limited context: " + ex);
    }

    JoinPointMatch joinPointMatch = shadowMatch.matchesJoinPoint(thisObject, targetObject, args);

    /*
     * Do a final check to see if any this(TYPE) kind of residue match. For
     * this purpose, we use the original method's (proxy method's) shadow to
     * ensure that 'this' is correctly checked against. Without this check,
     * we get incorrect match on this(TYPE) where TYPE matches the target
     * type but not 'this' (as would be the case of JDK dynamic proxies).
     * <p>See SPR-2979 for the original bug.
     */
    if (pmi != null) {  // there is a current invocation
      RuntimeTestWalker originalMethodResidueTest = getRuntimeTestWalker(originalShadowMatch);
      if (!originalMethodResidueTest.testThisInstanceOfResidue(thisObject.getClass())) {
        return false;
      }
    }
    if (joinPointMatch.matches() && pmi != null) {
      bindParameters(pmi, joinPointMatch);
    }
    return joinPointMatch.matches();
  }
View Full Code Here

      // No current invocation...
      // TODO: Should we really proceed here?
      logger.debug("Couldn't access current invocation - matching with limited context: " + ex);
    }

    JoinPointMatch joinPointMatch = shadowMatch.matchesJoinPoint(thisObject, targetObject, args);

    /*
     * Do a final check to see if any this(TYPE) kind of residue match. For
     * this purpose, we use the original method's (proxy method's) shadow to
     * ensure that 'this' is correctly checked against. Without this check,
     * we get incorrect match on this(TYPE) where TYPE matches the target
     * type but not 'this' (as would be the case of JDK dynamic proxies).
     * <p>See SPR-2979 for the original bug.
     */
    if (pmi != null) {  // there is a current invocation
      RuntimeTestWalker originalMethodResidueTest = new RuntimeTestWalker(originalShadowMatch);
      if (!originalMethodResidueTest.testThisInstanceOfResidue(thisObject.getClass())) {
        return false;
      }
    }
    if (joinPointMatch.matches() && pmi != null) {
      bindParameters(pmi, joinPointMatch);
    }
    return joinPointMatch.matches();
  }
View Full Code Here

    if (!(mi instanceof ProxyMethodInvocation)) {
      throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);
    }
    ProxyMethodInvocation pmi = (ProxyMethodInvocation) mi;
    ProceedingJoinPoint pjp = lazyGetProceedingJoinPoint(pmi);
    JoinPointMatch jpm = getJoinPointMatch(pmi);
    return invokeAdviceMethod(pjp, jpm, null, null);
  }
View Full Code Here

      // No current invocation...
      // TODO: Should we really proceed here?
      logger.debug("Couldn't access current invocation - matching with limited context: " + ex);
    }

    JoinPointMatch joinPointMatch = shadowMatch.matchesJoinPoint(thisObject, targetObject, args);

    /*
     * Do a final check to see if any this(TYPE) kind of residue match. For
     * this purpose, we use the original method's (proxy method's) shadow to
     * ensure that 'this' is correctly checked against. Without this check,
     * we get incorrect match on this(TYPE) where TYPE matches the target
     * type but not 'this' (as would be the case of JDK dynamic proxies).
     * <p>See SPR-2979 for the original bug.
     */
    if (pmi != null) {  // there is a current invocation
      RuntimeTestWalker originalMethodResidueTest = new RuntimeTestWalker(originalShadowMatch);
      if (!originalMethodResidueTest.testThisInstanceOfResidue(thisObject.getClass())) {
        return false;
      }
    }
    if (joinPointMatch.matches() && pmi != null) {
      bindParameters(pmi, joinPointMatch);
    }
    return joinPointMatch.matches();
  }
View Full Code Here

      // No current invocation...
      // TODO: Should we really proceed here?
      logger.debug("Couldn't access current invocation - matching with limited context: " + ex);
    }

    JoinPointMatch joinPointMatch = shadowMatch.matchesJoinPoint(thisObject, targetObject, args);

    /*
     * Do a final check to see if any this(TYPE) kind of residue match. For
     * this purpose, we use the original method's (proxy method's) shadow to
     * ensure that 'this' is correctly checked against. Without this check,
     * we get incorrect match on this(TYPE) where TYPE matches the target
     * type but not 'this' (as would be the case of JDK dynamic proxies).
     * <p>See SPR-2979 for the original bug.
     */
    if (pmi != null) {  // there is a current invocation
      RuntimeTestWalker originalMethodResidueTest = getRuntimeTestWalker(originalShadowMatch);
      if (!originalMethodResidueTest.testThisInstanceOfResidue(thisObject.getClass())) {
        return false;
      }
      if (joinPointMatch.matches()) {
        bindParameters(pmi, joinPointMatch);
      }
    }
    return joinPointMatch.matches();
  }
View Full Code Here

      // No current invocation...
      // TODO: Should we really proceed here?
      logger.debug("Couldn't access current invocation - matching with limited context: " + ex);
    }

    JoinPointMatch joinPointMatch = shadowMatch.matchesJoinPoint(thisObject, targetObject, args);

    /*
     * Do a final check to see if any this(TYPE) kind of residue match. For
     * this purpose, we use the original method's (proxy method's) shadow to
     * ensure that 'this' is correctly checked against. Without this check,
     * we get incorrect match on this(TYPE) where TYPE matches the target
     * type but not 'this' (as would be the case of JDK dynamic proxies).
     * <p>See SPR-2979 for the original bug.
     */
    if (pmi != null) {  // there is a current invocation
      RuntimeTestWalker originalMethodResidueTest = new RuntimeTestWalker(originalShadowMatch);
      if (!originalMethodResidueTest.testThisInstanceOfResidue(thisObject.getClass())) {
        return false;
      }
    }
    if (joinPointMatch.matches() && pmi != null) {
      bindParameters(pmi, joinPointMatch);
    }
    return joinPointMatch.matches();
  }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.tools.JoinPointMatch

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.