aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/AnnotationPatternList.java11
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/AnnotationPointcut.java7
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/ArgsAnnotationPointcut.java7
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/ArgsPointcut.java40
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/CflowPointcut.java7
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/ConcreteCflowPointcut.java5
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/DeclareAnnotation.java10
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java5
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/HandlerPointcut.java7
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/PerCflow.java7
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/PerFromSuper.java5
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/PerObject.java7
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/PerSingleton.java5
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/PerTypeWithin.java7
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/Pointcut.java5
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/ThisOrTargetAnnotationPointcut.java7
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/ThisOrTargetPointcut.java7
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/TypePattern.java4
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/WithinAnnotationPointcut.java7
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/WithinCodeAnnotationPointcut.java7
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/WithinPointcut.java7
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/WithincodePointcut.java7
22 files changed, 140 insertions, 41 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/AnnotationPatternList.java b/weaver/src/org/aspectj/weaver/patterns/AnnotationPatternList.java
index bac42e0af..7b089e5af 100644
--- a/weaver/src/org/aspectj/weaver/patterns/AnnotationPatternList.java
+++ b/weaver/src/org/aspectj/weaver/patterns/AnnotationPatternList.java
@@ -12,6 +12,7 @@ package org.aspectj.weaver.patterns;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.List;
+import java.util.Map;
import org.aspectj.util.FuzzyBoolean;
import org.aspectj.weaver.ISourceContext;
@@ -57,6 +58,16 @@ public class AnnotationPatternList extends PatternNode {
return typePatterns;
}
+ public AnnotationPatternList parameterizeWith(Map typeVariableMap) {
+ AnnotationTypePattern[] parameterizedPatterns = new AnnotationTypePattern[this.typePatterns.length];
+ for (int i = 0; i < parameterizedPatterns.length; i++) {
+ parameterizedPatterns[i] = this.typePatterns[i].parameterizeWith(typeVariableMap);
+ }
+ AnnotationPatternList ret = new AnnotationPatternList(parameterizedPatterns);
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
public void resolve(World inWorld) {
for (int i = 0; i < typePatterns.length; i++) {
typePatterns[i].resolve(inWorld);
diff --git a/weaver/src/org/aspectj/weaver/patterns/AnnotationPointcut.java b/weaver/src/org/aspectj/weaver/patterns/AnnotationPointcut.java
index cc1ae7d70..32fd6c0a1 100644
--- a/weaver/src/org/aspectj/weaver/patterns/AnnotationPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/AnnotationPointcut.java
@@ -16,6 +16,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.aspectj.util.FuzzyBoolean;
@@ -82,6 +83,12 @@ public class AnnotationPointcut extends NameBindingPointcut {
return Shadow.ALL_SHADOW_KINDS;
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ AnnotationPointcut ret = new AnnotationPointcut((ExactAnnotationTypePattern)annotationTypePattern.parameterizeWith(typeVariableMap));
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
/* (non-Javadoc)
* @see org.aspectj.weaver.patterns.Pointcut#fastMatch(org.aspectj.weaver.patterns.FastMatchInfo)
*/
diff --git a/weaver/src/org/aspectj/weaver/patterns/ArgsAnnotationPointcut.java b/weaver/src/org/aspectj/weaver/patterns/ArgsAnnotationPointcut.java
index 04a89d80a..c2e7d7931 100644
--- a/weaver/src/org/aspectj/weaver/patterns/ArgsAnnotationPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/ArgsAnnotationPointcut.java
@@ -14,6 +14,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.aspectj.bridge.IMessage;
@@ -58,6 +59,12 @@ public class ArgsAnnotationPointcut extends NameBindingPointcut {
return Shadow.ALL_SHADOW_KINDS; // empty args() matches jps with no args
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ ArgsAnnotationPointcut ret = new ArgsAnnotationPointcut(arguments.parameterizeWith(typeVariableMap));
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
/* (non-Javadoc)
* @see org.aspectj.weaver.patterns.Pointcut#fastMatch(org.aspectj.weaver.patterns.FastMatchInfo)
*/
diff --git a/weaver/src/org/aspectj/weaver/patterns/ArgsPointcut.java b/weaver/src/org/aspectj/weaver/patterns/ArgsPointcut.java
index c39a83858..c8bdee759 100644
--- a/weaver/src/org/aspectj/weaver/patterns/ArgsPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/ArgsPointcut.java
@@ -16,10 +16,9 @@ package org.aspectj.weaver.patterns;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Collections;
-import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.aspectj.bridge.IMessage;
@@ -59,6 +58,12 @@ public class ArgsPointcut extends NameBindingPointcut {
return arguments;
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ ArgsPointcut ret = new ArgsPointcut(this.arguments.parameterizeWith(typeVariableMap));
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
public Set couldMatchKinds() {
return Shadow.ALL_SHADOW_KINDS; // empty args() matches jps with no args
}
@@ -108,36 +113,6 @@ public class ArgsPointcut extends NameBindingPointcut {
return argumentsToMatchAgainst;
}
-
- /**
- * @param ret
- * @param pTypes
- * @return
- */
- private FuzzyBoolean checkSignatureMatch(Class[] pTypes) {
- Collection tps = arguments.getExactTypes();
- int sigIndex = 0;
- for (Iterator iter = tps.iterator(); iter.hasNext();) {
- UnresolvedType tp = (UnresolvedType) iter.next();
- Class lookForClass = getPossiblyBoxed(tp);
- if (lookForClass != null) {
- boolean foundMatchInSig = false;
- while (sigIndex < pTypes.length && !foundMatchInSig) {
- if (pTypes[sigIndex++] == lookForClass) foundMatchInSig = true;
- }
- if (!foundMatchInSig) {
- return FuzzyBoolean.NO;
- }
- }
- }
- return FuzzyBoolean.YES;
- }
-
- private Class getPossiblyBoxed(UnresolvedType tp) {
- Class ret = (Class) ExactTypePattern.primitiveTypesMap.get(tp.getName());
- if (ret == null) ret = (Class) ExactTypePattern.boxedPrimitivesMap.get(tp.getName());
- return ret;
- }
/* (non-Javadoc)
* @see org.aspectj.weaver.patterns.NameBindingPointcut#getBindingAnnotationTypePatterns()
@@ -232,6 +207,7 @@ public class ArgsPointcut extends NameBindingPointcut {
IMessage msg = new Message(
WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_ARG_TYPE,argType.getName()),
"",IMessage.ERROR,shadow.getSourceLocation(),null,new ISourceLocation[]{getSourceLocation()});
+ shadow.getIWorld().getMessageHandler().handleMessage(msg);
}
if (type.matchesInstanceof(argRTX).alwaysTrue()) {
continue;
diff --git a/weaver/src/org/aspectj/weaver/patterns/CflowPointcut.java b/weaver/src/org/aspectj/weaver/patterns/CflowPointcut.java
index 17d30f10f..1c7af01c7 100644
--- a/weaver/src/org/aspectj/weaver/patterns/CflowPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/CflowPointcut.java
@@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.aspectj.bridge.IMessage;
@@ -107,6 +108,12 @@ public class CflowPointcut extends Pointcut {
ret.readLocation(context, s);
return ret;
}
+
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ CflowPointcut ret = new CflowPointcut(entry.parameterizeWith(typeVariableMap),isBelow,freeVars);
+ ret.copyLocationFrom(this);
+ return ret;
+ }
public void resolveBindings(IScope scope, Bindings bindings) {
if (bindings == null) {
diff --git a/weaver/src/org/aspectj/weaver/patterns/ConcreteCflowPointcut.java b/weaver/src/org/aspectj/weaver/patterns/ConcreteCflowPointcut.java
index cc198a8c6..d86578be8 100644
--- a/weaver/src/org/aspectj/weaver/patterns/ConcreteCflowPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/ConcreteCflowPointcut.java
@@ -17,6 +17,7 @@ import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.aspectj.util.FuzzyBoolean;
@@ -77,6 +78,10 @@ public class ConcreteCflowPointcut extends Pointcut {
throw new RuntimeException("unimplemented");
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ throw new RuntimeException("unimplemented");
+ }
+
public boolean equals(Object other) {
if (!(other instanceof ConcreteCflowPointcut)) return false;
ConcreteCflowPointcut o = (ConcreteCflowPointcut)other;
diff --git a/weaver/src/org/aspectj/weaver/patterns/DeclareAnnotation.java b/weaver/src/org/aspectj/weaver/patterns/DeclareAnnotation.java
index 45582705e..9234ea8ce 100644
--- a/weaver/src/org/aspectj/weaver/patterns/DeclareAnnotation.java
+++ b/weaver/src/org/aspectj/weaver/patterns/DeclareAnnotation.java
@@ -115,8 +115,14 @@ public class DeclareAnnotation extends Declare {
}
public Declare parameterizeWith(Map typeVariableBindingMap) {
- // TODO Auto-generated method stub
- return this;
+ Declare ret;
+ if (this.kind == AT_TYPE) {
+ ret = new DeclareAnnotation(kind,this.typePattern.parameterizeWith(typeVariableBindingMap));
+ } else {
+ ret = new DeclareAnnotation(kind, this.sigPattern.parameterizeWith(typeVariableBindingMap));
+ }
+ ret.copyLocationFrom(this);
+ return ret;
}
public boolean isAdviceLike() {
diff --git a/weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java b/weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java
index 5aa00a5fb..e60ff8297 100644
--- a/weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java
+++ b/weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java
@@ -41,8 +41,9 @@ public class DeclarePrecedence extends Declare {
}
public Declare parameterizeWith(Map typeVariableBindingMap) {
- // TODO Auto-generated method stub
- return this;
+ DeclarePrecedence ret = new DeclarePrecedence(this.patterns.parameterizeWith(typeVariableBindingMap));
+ ret.copyLocationFrom(this);
+ return ret;
}
public String toString() {
diff --git a/weaver/src/org/aspectj/weaver/patterns/HandlerPointcut.java b/weaver/src/org/aspectj/weaver/patterns/HandlerPointcut.java
index 936cecf83..a92eaa007 100644
--- a/weaver/src/org/aspectj/weaver/patterns/HandlerPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/HandlerPointcut.java
@@ -16,6 +16,7 @@ package org.aspectj.weaver.patterns;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.HashSet;
+import java.util.Map;
import java.util.Set;
import org.aspectj.bridge.MessageUtil;
@@ -69,6 +70,12 @@ public class HandlerPointcut extends Pointcut {
TypePattern.STATIC);
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ HandlerPointcut ret = new HandlerPointcut(exceptionType.parameterizeWith(typeVariableMap));
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
public boolean equals(Object other) {
if (!(other instanceof HandlerPointcut)) return false;
HandlerPointcut o = (HandlerPointcut)other;
diff --git a/weaver/src/org/aspectj/weaver/patterns/PerCflow.java b/weaver/src/org/aspectj/weaver/patterns/PerCflow.java
index 27a2c6144..dd63f3d51 100644
--- a/weaver/src/org/aspectj/weaver/patterns/PerCflow.java
+++ b/weaver/src/org/aspectj/weaver/patterns/PerCflow.java
@@ -19,6 +19,7 @@ import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.aspectj.util.FuzzyBoolean;
@@ -70,6 +71,12 @@ public class PerCflow extends PerClause {
entry.resolve(scope);
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ PerCflow ret = new PerCflow(entry.parameterizeWith(typeVariableMap),isBelow);
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
protected Test findResidueInternal(Shadow shadow, ExposedState state) {
Expr myInstance =
Expr.makeCallExpr(AjcMemberMaker.perCflowAspectOfMethod(inAspect),
diff --git a/weaver/src/org/aspectj/weaver/patterns/PerFromSuper.java b/weaver/src/org/aspectj/weaver/patterns/PerFromSuper.java
index 1b197374e..02335285e 100644
--- a/weaver/src/org/aspectj/weaver/patterns/PerFromSuper.java
+++ b/weaver/src/org/aspectj/weaver/patterns/PerFromSuper.java
@@ -15,6 +15,7 @@ package org.aspectj.weaver.patterns;
import java.io.DataOutputStream;
import java.io.IOException;
+import java.util.Map;
import java.util.Set;
import org.aspectj.bridge.MessageUtil;
@@ -76,6 +77,10 @@ public class PerFromSuper extends PerClause {
}
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ return this;
+ }
+
public PerClause lookupConcretePerClause(ResolvedType lookupType) {
diff --git a/weaver/src/org/aspectj/weaver/patterns/PerObject.java b/weaver/src/org/aspectj/weaver/patterns/PerObject.java
index 3481daa8e..b29fee3fc 100644
--- a/weaver/src/org/aspectj/weaver/patterns/PerObject.java
+++ b/weaver/src/org/aspectj/weaver/patterns/PerObject.java
@@ -17,6 +17,7 @@ import java.io.DataOutputStream;
import java.io.IOException;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.Map;
import java.util.Set;
import org.aspectj.util.FuzzyBoolean;
@@ -77,6 +78,12 @@ public class PerObject extends PerClause {
entry.resolve(scope);
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ PerObject ret = new PerObject(entry.parameterizeWith(typeVariableMap),isThis);
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
private Var getVar(Shadow shadow) {
return isThis ? shadow.getThisVar() : shadow.getTargetVar();
}
diff --git a/weaver/src/org/aspectj/weaver/patterns/PerSingleton.java b/weaver/src/org/aspectj/weaver/patterns/PerSingleton.java
index 8c3339e47..f8155ed70 100644
--- a/weaver/src/org/aspectj/weaver/patterns/PerSingleton.java
+++ b/weaver/src/org/aspectj/weaver/patterns/PerSingleton.java
@@ -15,6 +15,7 @@ package org.aspectj.weaver.patterns;
import java.io.DataOutputStream;
import java.io.IOException;
+import java.util.Map;
import java.util.Set;
import org.aspectj.util.FuzzyBoolean;
@@ -52,6 +53,10 @@ public class PerSingleton extends PerClause {
// this method intentionally left blank
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ return this;
+ }
+
public Test findResidueInternal(Shadow shadow, ExposedState state) {
// TODO: the commented code is for slow Aspects.aspectOf() style - keep or remove
//
diff --git a/weaver/src/org/aspectj/weaver/patterns/PerTypeWithin.java b/weaver/src/org/aspectj/weaver/patterns/PerTypeWithin.java
index 6a4f5ecd8..b1fb147c1 100644
--- a/weaver/src/org/aspectj/weaver/patterns/PerTypeWithin.java
+++ b/weaver/src/org/aspectj/weaver/patterns/PerTypeWithin.java
@@ -15,6 +15,7 @@ package org.aspectj.weaver.patterns;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.HashSet;
+import java.util.Map;
import java.util.Set;
import org.aspectj.bridge.IMessage;
@@ -62,6 +63,12 @@ public class PerTypeWithin extends PerClause {
return kindSet;
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ PerTypeWithin ret = new PerTypeWithin(typePattern.parameterizeWith(typeVariableMap));
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
// -----
public FuzzyBoolean fastMatch(FastMatchInfo info) {
if (typePattern.annotationPattern instanceof AnyAnnotationTypePattern) {
diff --git a/weaver/src/org/aspectj/weaver/patterns/Pointcut.java b/weaver/src/org/aspectj/weaver/patterns/Pointcut.java
index 6ad74a91e..64029dd29 100644
--- a/weaver/src/org/aspectj/weaver/patterns/Pointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/Pointcut.java
@@ -379,9 +379,6 @@ public abstract class Pointcut extends PatternNode {
}
}
- public Pointcut parameterizeWith(Map typeVariableMap) {
- throw new UnsupportedOperationException("this method needs to be defined in all subtypes and then made abstract when the work is complete");
- }
-
+ public abstract Pointcut parameterizeWith(Map typeVariableMap);
}
diff --git a/weaver/src/org/aspectj/weaver/patterns/ThisOrTargetAnnotationPointcut.java b/weaver/src/org/aspectj/weaver/patterns/ThisOrTargetAnnotationPointcut.java
index 0a83c3d49..b5526f9d8 100644
--- a/weaver/src/org/aspectj/weaver/patterns/ThisOrTargetAnnotationPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/ThisOrTargetAnnotationPointcut.java
@@ -16,6 +16,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.aspectj.bridge.IMessage;
@@ -78,6 +79,12 @@ public class ThisOrTargetAnnotationPointcut extends NameBindingPointcut {
return isThis ? thisKindSet : targetKindSet;
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ ThisOrTargetAnnotationPointcut ret = new ThisOrTargetAnnotationPointcut(isThis,(ExactAnnotationTypePattern)annotationTypePattern.parameterizeWith(typeVariableMap));
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
/* (non-Javadoc)
* @see org.aspectj.weaver.patterns.Pointcut#fastMatch(org.aspectj.weaver.patterns.FastMatchInfo)
*/
diff --git a/weaver/src/org/aspectj/weaver/patterns/ThisOrTargetPointcut.java b/weaver/src/org/aspectj/weaver/patterns/ThisOrTargetPointcut.java
index 7eb8ad276..b458c5d97 100644
--- a/weaver/src/org/aspectj/weaver/patterns/ThisOrTargetPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/ThisOrTargetPointcut.java
@@ -20,6 +20,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.aspectj.bridge.IMessage;
@@ -76,6 +77,12 @@ public class ThisOrTargetPointcut extends NameBindingPointcut {
public boolean isThis() { return isThis; }
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ ThisOrTargetPointcut ret = new ThisOrTargetPointcut(isThis,type.parameterizeWith(typeVariableMap));
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
public Set couldMatchKinds() {
return isThis ? thisKindSet : targetKindSet;
}
diff --git a/weaver/src/org/aspectj/weaver/patterns/TypePattern.java b/weaver/src/org/aspectj/weaver/patterns/TypePattern.java
index b98b7a169..ca7f99547 100644
--- a/weaver/src/org/aspectj/weaver/patterns/TypePattern.java
+++ b/weaver/src/org/aspectj/weaver/patterns/TypePattern.java
@@ -476,7 +476,9 @@ class AnyWithAnnotationTypePattern extends TypePattern {
}
public TypePattern parameterizeWith(Map typeVariableMap) {
- return this;
+ AnyWithAnnotationTypePattern ret = new AnyWithAnnotationTypePattern(this.annotationPattern.parameterizeWith(typeVariableMap));
+ ret.copyLocationFrom(this);
+ return ret;
}
public void write(DataOutputStream s) throws IOException {
diff --git a/weaver/src/org/aspectj/weaver/patterns/WithinAnnotationPointcut.java b/weaver/src/org/aspectj/weaver/patterns/WithinAnnotationPointcut.java
index 29037c51a..886faf6db 100644
--- a/weaver/src/org/aspectj/weaver/patterns/WithinAnnotationPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/WithinAnnotationPointcut.java
@@ -14,6 +14,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.aspectj.bridge.IMessage;
@@ -67,6 +68,12 @@ public class WithinAnnotationPointcut extends NameBindingPointcut {
return Shadow.ALL_SHADOW_KINDS;
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ WithinAnnotationPointcut ret = new WithinAnnotationPointcut(this.annotationTypePattern.parameterizeWith(typeVariableMap));
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
/* (non-Javadoc)
* @see org.aspectj.weaver.patterns.Pointcut#fastMatch(org.aspectj.weaver.patterns.FastMatchInfo)
*/
diff --git a/weaver/src/org/aspectj/weaver/patterns/WithinCodeAnnotationPointcut.java b/weaver/src/org/aspectj/weaver/patterns/WithinCodeAnnotationPointcut.java
index 5c07ef024..d61d13e79 100644
--- a/weaver/src/org/aspectj/weaver/patterns/WithinCodeAnnotationPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/WithinCodeAnnotationPointcut.java
@@ -15,6 +15,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.aspectj.util.FuzzyBoolean;
@@ -72,6 +73,12 @@ public class WithinCodeAnnotationPointcut extends NameBindingPointcut {
public Set couldMatchKinds() {
return matchedShadowKinds;
}
+
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ WithinCodeAnnotationPointcut ret = new WithinCodeAnnotationPointcut((ExactAnnotationTypePattern)this.annotationTypePattern.parameterizeWith(typeVariableMap));
+ ret.copyLocationFrom(this);
+ return ret;
+ }
/* (non-Javadoc)
* @see org.aspectj.weaver.patterns.Pointcut#fastMatch(org.aspectj.weaver.patterns.FastMatchInfo)
diff --git a/weaver/src/org/aspectj/weaver/patterns/WithinPointcut.java b/weaver/src/org/aspectj/weaver/patterns/WithinPointcut.java
index 9f3054643..a5e35f453 100644
--- a/weaver/src/org/aspectj/weaver/patterns/WithinPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/WithinPointcut.java
@@ -15,6 +15,7 @@ package org.aspectj.weaver.patterns;
import java.io.DataOutputStream;
import java.io.IOException;
+import java.util.Map;
import java.util.Set;
import org.aspectj.bridge.IMessage;
@@ -57,6 +58,12 @@ public class WithinPointcut extends Pointcut {
return Shadow.ALL_SHADOW_KINDS;
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ WithinPointcut ret = new WithinPointcut(this.typePattern.parameterizeWith(typeVariableMap));
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
public FuzzyBoolean fastMatch(FastMatchInfo info) {
if (typePattern.annotationPattern instanceof AnyAnnotationTypePattern) {
return isWithinType(info.getType());
diff --git a/weaver/src/org/aspectj/weaver/patterns/WithincodePointcut.java b/weaver/src/org/aspectj/weaver/patterns/WithincodePointcut.java
index dce908d9e..88315200a 100644
--- a/weaver/src/org/aspectj/weaver/patterns/WithincodePointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/WithincodePointcut.java
@@ -16,6 +16,7 @@ package org.aspectj.weaver.patterns;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.HashSet;
+import java.util.Map;
import java.util.Set;
import org.aspectj.bridge.MessageUtil;
@@ -56,6 +57,12 @@ public class WithincodePointcut extends Pointcut {
return matchedShadowKinds;
}
+ public Pointcut parameterizeWith(Map typeVariableMap) {
+ WithincodePointcut ret = new WithincodePointcut(signature.parameterizeWith(typeVariableMap));
+ ret.copyLocationFrom(this);
+ return ret;
+ }
+
public FuzzyBoolean fastMatch(FastMatchInfo type) {
return FuzzyBoolean.MAYBE;
}