From d667d9eeb975c3de1953e5057209dee451b62231 Mon Sep 17 00:00:00 2001 From: acolyer Date: Fri, 24 Feb 2006 12:34:51 +0000 Subject: [PATCH] Completed: Improve ajc memory usage expose generic sig for structural comparison --- weaver/src/org/aspectj/weaver/ReferenceType.java | 5 +++++ weaver/src/org/aspectj/weaver/ResolvedType.java | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/weaver/src/org/aspectj/weaver/ReferenceType.java b/weaver/src/org/aspectj/weaver/ReferenceType.java index aa0c303e6..9c6b529c7 100644 --- a/weaver/src/org/aspectj/weaver/ReferenceType.java +++ b/weaver/src/org/aspectj/weaver/ReferenceType.java @@ -134,6 +134,11 @@ public class ReferenceType extends ResolvedType { return !isParameterizedType() && !isRawType() && delegate.isGeneric(); } + public String getGenericSignature() { + String sig = delegate.getDeclaredGenericSignature(); + return (sig == null) ? "" : sig; + } + public AnnotationX[] getAnnotations() { return delegate.getAnnotations(); } diff --git a/weaver/src/org/aspectj/weaver/ResolvedType.java b/weaver/src/org/aspectj/weaver/ResolvedType.java index 0e78007f0..798c00e20 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedType.java +++ b/weaver/src/org/aspectj/weaver/ResolvedType.java @@ -1831,6 +1831,15 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl return null; } + /** + * overriden by ReferenceType to return the gsig for a generic type + * @return + */ + public String getGenericSignature() { + return ""; + } + + public ResolvedType parameterizedWith(UnresolvedType[] typeParameters) { if (!(isGenericType() || isParameterizedType())) return this; return TypeFactory.createParameterizedType(this.getGenericType(), typeParameters, getWorld()); -- 2.39.5