From 720ef7d33e679b6b2f134b1f096bfbd2027adb52 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 23 Jun 2005 07:30:50 +0000 Subject: [PATCH] generics: Holds a generic type reference (used by the raw or parameterized variants) --- .../src/org/aspectj/weaver/ReferenceType.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/weaver/src/org/aspectj/weaver/ReferenceType.java b/weaver/src/org/aspectj/weaver/ReferenceType.java index 7f62a0030..9ac887cc0 100644 --- a/weaver/src/org/aspectj/weaver/ReferenceType.java +++ b/weaver/src/org/aspectj/weaver/ReferenceType.java @@ -19,6 +19,13 @@ import org.aspectj.bridge.ISourceLocation; import org.aspectj.weaver.patterns.PerClause; public class ReferenceType extends ResolvedTypeX { + + /** + * For parameterized types (or the raw type) - this field points to the actual + * reference type from which they are derived. + */ + ReferenceType genericType = null; + ReferenceTypeDelegate delegate = null; ISourceContext sourceContext = null; int startPos = 0; @@ -28,6 +35,16 @@ public class ReferenceType extends ResolvedTypeX { public ReferenceType(String signature, World world) { super(signature, world); } + + public ReferenceType(ReferenceType genericType,String signature, World world) { + super(signature,world); + this.genericType=genericType; + setDelegate(genericType.getDelegate()); + // TODO asc generics: for non generic types, should we hold a delegate here or just + // delegate to the one on the generic type? it might let us be a little more flexible + // if we do this - changing just the generic type delegate will affect all parameterized + // and raw variants + } public final boolean isClass() { return delegate.isClass(); -- 2.39.5