From: aclement Date: Tue, 8 Jun 2010 22:56:43 +0000 (+0000) Subject: generics and ITD inner class updates X-Git-Tag: V1_6_9RC2~38 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=676208f954d93130e873a78c94a1934a4170cf8d;p=aspectj.git generics and ITD inner class updates --- diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/AjAttribute.java b/org.aspectj.matcher/src/org/aspectj/weaver/AjAttribute.java index ab1aca134..a727825b0 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/AjAttribute.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/AjAttribute.java @@ -94,6 +94,7 @@ public abstract class AjAttribute { if (bytes == null) { bytes = new byte[0]; } + VersionedDataInputStream s = new VersionedDataInputStream(new ByteArrayInputStream(bytes), dataDecompressor); s.setVersion(v); if (name.equals(Aspect.AttributeName)) { diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/CustomMungerFactory.java b/org.aspectj.matcher/src/org/aspectj/weaver/CustomMungerFactory.java index dcae584aa..91bcbdf6b 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/CustomMungerFactory.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/CustomMungerFactory.java @@ -38,15 +38,15 @@ public interface CustomMungerFactory { * @param aspectType * @return a Collection<ShadowMunger> of custom shadow mungers for the given aspect */ - public Collection/* ShadowMunger */createCustomShadowMungers(ResolvedType aspectType); + public Collection createCustomShadowMungers(ResolvedType aspectType); /** * @param aspectType * @return a Collection<ConcreteTypeMunger> of custom type mungers for the given aspect */ - public Collection/* ConcreteTypeMunger */createCustomTypeMungers(ResolvedType aspectType); + public Collection createCustomTypeMungers(ResolvedType aspectType); - public Collection/* ShadowMunger */getAllCreatedCustomShadowMungers(); + public Collection getAllCreatedCustomShadowMungers(); - public Collection/* ConcreteTypeMunger */getAllCreatedCustomTypeMungers(); + public Collection getAllCreatedCustomTypeMungers(); } diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/NewMemberClassTypeMunger.java b/org.aspectj.matcher/src/org/aspectj/weaver/NewMemberClassTypeMunger.java index 732fced23..e7576e96a 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/NewMemberClassTypeMunger.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/NewMemberClassTypeMunger.java @@ -42,10 +42,10 @@ public class NewMemberClassTypeMunger extends ResolvedTypeMunger { writeOutTypeAliases(stream); } - public static ResolvedTypeMunger read(VersionedDataInputStream stream, ISourceContext context) throws IOException { + public static ResolvedTypeMunger readInnerClass(VersionedDataInputStream stream, ISourceContext context) throws IOException { /* int version = */stream.readInt(); - String memberTypeName = stream.readUTF(); UnresolvedType targetType = UnresolvedType.read(stream); + String memberTypeName = stream.readUTF(); ISourceLocation sourceLocation = readSourceLocation(stream); List typeVarAliases = readInTypeAliases(stream); @@ -55,6 +55,10 @@ public class NewMemberClassTypeMunger extends ResolvedTypeMunger { return newInstance; } + public UnresolvedType getTargetType() { + return targetType; + } + public UnresolvedType getDeclaringType() { return targetType; } diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedTypeMunger.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedTypeMunger.java index 94503d5ea..e08fe2f2e 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedTypeMunger.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedTypeMunger.java @@ -161,7 +161,7 @@ public abstract class ResolvedTypeMunger { } else if (kind == MethodDelegate2) { return MethodDelegateTypeMunger.readMethod(s, context, true); } else if (kind == InnerClass) { - return NewMemberClassTypeMunger.read(s, context); + return NewMemberClassTypeMunger.readInnerClass(s, context); } else { throw new RuntimeException("unimplemented"); }