diff options
author | Andy Clement <andrew.clement@gmail.com> | 2012-03-23 18:17:09 -0700 |
---|---|---|
committer | Andy Clement <andrew.clement@gmail.com> | 2012-03-23 18:17:09 -0700 |
commit | f85631fd2fb2e0f3213abb9c5a7cd86eec2c9ab5 (patch) | |
tree | 211fd1e8798b7a7886dbb2a035677444cdec73ff /org.aspectj.matcher/src/org/aspectj/weaver/patterns | |
parent | 549d227a8ded88d708415162b36cb273ec496b77 (diff) | |
download | aspectj-f85631fd2fb2e0f3213abb9c5a7cd86eec2c9ab5.tar.gz aspectj-f85631fd2fb2e0f3213abb9c5a7cd86eec2c9ab5.zip |
374964
Diffstat (limited to 'org.aspectj.matcher/src/org/aspectj/weaver/patterns')
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/patterns/PointcutEvaluationExpenseComparator.java | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PointcutEvaluationExpenseComparator.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PointcutEvaluationExpenseComparator.java index 18cdfa3f3..5f3a3291f 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PointcutEvaluationExpenseComparator.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/PointcutEvaluationExpenseComparator.java @@ -25,14 +25,15 @@ public class PointcutEvaluationExpenseComparator implements Comparator<Pointcut> private static final int WITHINCODE = 7; private static final int ATWITHINCODE = 8; private static final int EXE_INIT_PREINIT = 9; - private static final int THIS_OR_TARGET = 10; - private static final int CALL = 11; - private static final int ANNOTATION = 12; - private static final int AT_THIS_OR_TARGET = 13; - private static final int ARGS = 14; - private static final int AT_ARGS = 15; - private static final int CFLOW = 16; - private static final int IF = 17; + private static final int CALL_WITH_DECLARING_TYPE = 10; + private static final int THIS_OR_TARGET = 11; + private static final int CALL_WITHOUT_DECLARING_TYPE = 12; + private static final int ANNOTATION = 13; + private static final int AT_THIS_OR_TARGET = 14; + private static final int ARGS = 15; + private static final int AT_ARGS = 16; + private static final int CFLOW = 17; + private static final int IF = 18; private static final int OTHER = 20; /** @@ -85,7 +86,12 @@ public class PointcutEvaluationExpenseComparator implements Comparator<Pointcut> if (kind == Shadow.AdviceExecution) { return ADVICEEXECUTION; } else if ((kind == Shadow.ConstructorCall) || (kind == Shadow.MethodCall)) { - return CALL; + TypePattern declaringTypePattern = kp.getSignature().getDeclaringType(); + if (declaringTypePattern instanceof AnyTypePattern) { + return CALL_WITHOUT_DECLARING_TYPE; + } else { + return CALL_WITH_DECLARING_TYPE; + } } else if ((kind == Shadow.ConstructorExecution) || (kind == Shadow.MethodExecution) || (kind == Shadow.Initialization) || (kind == Shadow.PreInitialization)) { return EXE_INIT_PREINIT; |