From: acolyer Date: Thu, 24 Nov 2005 13:02:32 +0000 (+0000) Subject: hopefully the last word on parameterizing pointcuts in all their various glorious... X-Git-Tag: V1_5_0RC1~120 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b3be9410fcd333a516e6a220d30f9705b7aa9748;p=aspectj.git hopefully the last word on parameterizing pointcuts in all their various glorious flavours --- diff --git a/weaver/src/org/aspectj/weaver/ResolvedPointcutDefinition.java b/weaver/src/org/aspectj/weaver/ResolvedPointcutDefinition.java index cf3d5967d..4335957e1 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedPointcutDefinition.java +++ b/weaver/src/org/aspectj/weaver/ResolvedPointcutDefinition.java @@ -147,8 +147,8 @@ public class ResolvedPointcutDefinition extends ResolvedMemberImpl { ret.setSourceContext(getSourceContext()); ret.setPosition(getStart(),getEnd()); ret.setParameterNames(getParameterNames()); - //return ret; - return this; + return ret; + //return this; } // for testing diff --git a/weaver/src/org/aspectj/weaver/patterns/ReferencePointcut.java b/weaver/src/org/aspectj/weaver/patterns/ReferencePointcut.java index 2f2c965a4..f20223cb4 100644 --- a/weaver/src/org/aspectj/weaver/patterns/ReferencePointcut.java +++ b/weaver/src/org/aspectj/weaver/patterns/ReferencePointcut.java @@ -194,6 +194,7 @@ public class ReferencePointcut extends Pointcut { return; } + //if (onType == null) onType = pointcutDef.getDeclaringType(); if (onType != null) { if (onType.isParameterizedType()) { // build a type map mapping type variable names in the generic type to diff --git a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java index d3e4cfff3..8313460bd 100644 --- a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java +++ b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java @@ -18,6 +18,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.StringTokenizer; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.Message; @@ -532,8 +533,24 @@ public class WildTypePattern extends TypePattern { } public TypePattern parameterizeWith(Map typeVariableMap) { + NamePattern[] newNamePatterns = new NamePattern[namePatterns.length]; + for(int i=0; i