ResolvedType aspectType = world.fromEclipse(classScope.referenceContext.binding);
-
+
// This signature represents what we want consumers of the targetted type to 'see'
- ResolvedMember signature = world.makeResolvedMember(binding,onTypeBinding);
+ ResolvedMember signature = world.makeResolvedMemberForITD(binding,onTypeBinding,interTypeScope.getRecoveryAliases());
signature.resetKind(Member.CONSTRUCTOR);
signature.resetName("<init>");
int resetModifiers = declaredModifiers;
AjcMemberMaker.interConstructor(declaringTypeX, signature, aspectType);
NewConstructorTypeMunger myMunger =
- new NewConstructorTypeMunger(signature, syntheticInterMember, null, null);
+ new NewConstructorTypeMunger(signature, syntheticInterMember, null, null,typeVariableAliases);
setMunger(myMunger);
myMunger.check(world.getWorld());
import org.aspectj.org.eclipse.jdt.internal.compiler.env.IConstants;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
+import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
import org.aspectj.weaver.ConcreteTypeMunger;
import org.aspectj.weaver.NewConstructorTypeMunger;
private void mungeNewConstructor(SourceTypeBinding sourceType, NewConstructorTypeMunger munger) {
if (shouldTreatAsPublic()) {
- MethodBinding binding = world.makeMethodBinding(munger.getSignature());
+ MethodBinding binding = world.makeMethodBinding(munger.getSignature(),munger.getTypeVariableAliases());
findOrCreateInterTypeMemberFinder(sourceType).addInterTypeMethod(binding);
//classScope.referenceContext.binding.addMethod(binding);
} else {
import java.io.DataOutputStream;
import java.io.IOException;
+import java.util.List;
import java.util.Set;
import org.aspectj.bridge.IMessage;
+import org.aspectj.bridge.ISourceLocation;
public class NewConstructorTypeMunger extends ResolvedTypeMunger {
private ResolvedMember syntheticConstructor;
ResolvedMember signature,
ResolvedMember syntheticConstructor,
ResolvedMember explicitConstructor,
- Set superMethodsCalled)
- {
+ Set superMethodsCalled,
+ List typeVariableAliases) {
super(Constructor, signature);
this.syntheticConstructor = syntheticConstructor;
+ this.typeVariableAliases = typeVariableAliases;
this.explicitConstructor = explicitConstructor;
this.setSuperMethodsCalled(superMethodsCalled);
explicitConstructor.write(s);
writeSuperMethodsCalled(s);
writeSourceLocation(s);
+ writeOutTypeAliases(s);
}
public static ResolvedTypeMunger readConstructor(VersionedDataInputStream s, ISourceContext context) throws IOException {
- ResolvedTypeMunger munger = new NewConstructorTypeMunger(
- ResolvedMemberImpl.readResolvedMember(s, context),
- ResolvedMemberImpl.readResolvedMember(s, context),
- ResolvedMemberImpl.readResolvedMember(s, context),
- readSuperMethodsCalled(s));
- munger.setSourceLocation(readSourceLocation(s));
+ ISourceLocation sloc = null;
+ ResolvedMember sig = ResolvedMemberImpl.readResolvedMember(s, context);
+ ResolvedMember syntheticCtor = ResolvedMemberImpl.readResolvedMember(s, context);
+ ResolvedMember explicitCtor = ResolvedMemberImpl.readResolvedMember(s, context);
+ Set superMethodsCalled = readSuperMethodsCalled(s);
+ sloc = readSourceLocation(s);
+ List typeVarAliases = readInTypeAliases(s);
+ ResolvedTypeMunger munger = new NewConstructorTypeMunger(sig,syntheticCtor,explicitCtor,superMethodsCalled,typeVarAliases);
+ if (sloc!=null) munger.setSourceLocation(sloc);
return munger;
}