summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-07-28 10:56:48 +0000
committeracolyer <acolyer>2005-07-28 10:56:48 +0000
commitee5d75f4b0d2827606ce63dbae0f019a8430d4c3 (patch)
tree1f1ca5abc349186806cfda27df305b9b05231908 /weaver
parent2fd6898f0a4fcc4bd0a3d142b10cff44b131b022 (diff)
downloadaspectj-ee5d75f4b0d2827606ce63dbae0f019a8430d4c3.tar.gz
aspectj-ee5d75f4b0d2827606ce63dbae0f019a8430d4c3.zip
no more parameterized or type variable types for declaring type patterns (generics simplification plan).
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/DeclareParents.java44
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/KindedPointcut.java2
2 files changed, 23 insertions, 23 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/DeclareParents.java b/weaver/src/org/aspectj/weaver/patterns/DeclareParents.java
index 926a9fcb6..22492a88c 100644
--- a/weaver/src/org/aspectj/weaver/patterns/DeclareParents.java
+++ b/weaver/src/org/aspectj/weaver/patterns/DeclareParents.java
@@ -35,7 +35,7 @@ public class DeclareParents extends Declare {
private TypePattern child;
private TypePatternList parents;
private boolean isWildChild = false;
- private String[] typeVariablesInScope = new String[0]; // AspectJ 5 extension for generic types
+// private String[] typeVariablesInScope = new String[0]; // AspectJ 5 extension for generic types
public DeclareParents(TypePattern child, List parents) {
@@ -48,13 +48,13 @@ public class DeclareParents extends Declare {
if (child instanceof WildTypePattern) isWildChild = true;
}
- public String[] getTypeParameterNames() {
- return this.typeVariablesInScope;
- }
-
- public void setTypeParametersInScope(String[] typeParameters) {
- this.typeVariablesInScope = typeParameters;
- }
+// public String[] getTypeParameterNames() {
+// return this.typeVariablesInScope;
+// }
+//
+// public void setTypeParametersInScope(String[] typeParameters) {
+// this.typeVariablesInScope = typeParameters;
+// }
public boolean match(ResolvedType typeX) {
if (!child.matchesStatically(typeX)) return false;
@@ -100,22 +100,22 @@ public class DeclareParents extends Declare {
s.writeByte(Declare.PARENTS);
child.write(s);
parents.write(s);
- s.writeInt(typeVariablesInScope.length);
- for (int i = 0; i < typeVariablesInScope.length; i++) {
- s.writeUTF(typeVariablesInScope[i]);
- }
+// s.writeInt(typeVariablesInScope.length);
+// for (int i = 0; i < typeVariablesInScope.length; i++) {
+// s.writeUTF(typeVariablesInScope[i]);
+// }
writeLocation(s);
}
public static Declare read(VersionedDataInputStream s, ISourceContext context) throws IOException {
DeclareParents ret = new DeclareParents(TypePattern.read(s, context), TypePatternList.read(s, context));
- if (s.getMajorVersion()>=AjAttribute.WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ150) {
- int numTypeVariablesInScope = s.readInt();
- ret.typeVariablesInScope = new String[numTypeVariablesInScope];
- for (int i = 0; i < numTypeVariablesInScope; i++) {
- ret.typeVariablesInScope[i] = s.readUTF();
- }
- }
+// if (s.getMajorVersion()>=AjAttribute.WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ150) {
+// int numTypeVariablesInScope = s.readInt();
+// ret.typeVariablesInScope = new String[numTypeVariablesInScope];
+// for (int i = 0; i < numTypeVariablesInScope; i++) {
+// ret.typeVariablesInScope[i] = s.readUTF();
+// }
+// }
ret.readLocation(context, s);
return ret;
}
@@ -134,9 +134,9 @@ public class DeclareParents extends Declare {
}
public void resolve(IScope scope) {
- ScopeWithTypeVariables resolutionScope = new ScopeWithTypeVariables(typeVariablesInScope,scope);
- child = child.resolveBindings(resolutionScope, Bindings.NONE, false, false);
- parents = parents.resolveBindings(resolutionScope, Bindings.NONE, false, true);
+// ScopeWithTypeVariables resolutionScope = new ScopeWithTypeVariables(typeVariablesInScope,scope);
+ child = child.resolveBindings(scope, Bindings.NONE, false, false);
+ parents = parents.resolveBindings(scope, Bindings.NONE, false, true);
// Could assert this ...
// for (int i=0; i < parents.size(); i++) {
diff --git a/weaver/src/org/aspectj/weaver/patterns/KindedPointcut.java b/weaver/src/org/aspectj/weaver/patterns/KindedPointcut.java
index d4e1de80d..cfda6c1bf 100644
--- a/weaver/src/org/aspectj/weaver/patterns/KindedPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/KindedPointcut.java
@@ -305,7 +305,7 @@ public class KindedPointcut extends Pointcut {
// only allow parameterized types with extends...
if (kind == Shadow.StaticInitialization) {
UnresolvedType exactType = signature.getDeclaringType().getExactType();
- if (exactType.isParameterizedType() && !signature.getDeclaringType().isIncludeSubtypes()) {
+ if (exactType.isParameterizedType()) {
scope.message(MessageUtil.error(WeaverMessages.format(WeaverMessages.NO_STATIC_INIT_JPS_FOR_PARAMETERIZED_TYPES),
getSourceLocation()));
}