parameterizedSignature = getSignature().parameterizedWith(target.getTypeParameters(),genericType,target.isParameterizedType(),typeVariableAliases);
}
NewFieldTypeMunger nftm = new NewFieldTypeMunger(parameterizedSignature,getSuperMethodsCalled(),typeVariableAliases);
- nftm.setOriginalSignature(getSignature());
+ nftm.setDeclaredSignature(getSignature());
return nftm;
}
return AjcMemberMaker.interMethodBody(signature, aspectType);
}
+ /**
+ * If the munger has a declared signature
+ */
+ public ResolvedMember getDeclaredInterMethodBody(UnresolvedType aspectType,World w) {
+ if (declaredSignature!=null) {
+ ResolvedMember rm = declaredSignature.parameterizedWith(null,signature.getDeclaringType().resolve(w),false,getTypeVariableAliases());
+ return AjcMemberMaker.interMethodBody(rm, aspectType);
+ } else {
+ return AjcMemberMaker.interMethodBody(signature,aspectType);
+ }
+ }
+
public ResolvedMember getInterMethodDispatcher(UnresolvedType aspectType) {
return AjcMemberMaker.interMethodDispatcher(signature, aspectType);
}
+
+ public ResolvedMember getDeclaredInterMethodDispatcher(UnresolvedType aspectType,World w) {
+ if (declaredSignature!=null) {
+ ResolvedMember rm = declaredSignature.parameterizedWith(null,signature.getDeclaringType().resolve(w),false,getTypeVariableAliases());
+ return AjcMemberMaker.interMethodDispatcher(rm, aspectType);
+ } else {
+ return AjcMemberMaker.interMethodDispatcher(signature,aspectType);
+ }
+ }
public void write(DataOutputStream s) throws IOException {
kind.write(s);
parameterizedSignature = getSignature().parameterizedWith(target.getTypeParameters(),genericType,target.isParameterizedType(),typeVariableAliases);
}
NewMethodTypeMunger nmtm = new NewMethodTypeMunger(parameterizedSignature,getSuperMethodsCalled(),typeVariableAliases);
- nmtm.setOriginalSignature(getSignature());
+ nmtm.setDeclaredSignature(getSignature());
return nmtm;
}
protected Kind kind;
protected ResolvedMember signature;
- protected ResolvedMember originalSignature;
+ /**
+ * The declared signature is filled in when a type munger is parameterized for application to
+ * a particular type. It represents the signature originally declared in the source file.
+ */
+ protected ResolvedMember declaredSignature;
- public void setOriginalSignature(ResolvedMember rm) {
- originalSignature = rm;
- }
- public ResolvedMember getMostOriginalSignature() {
- if (originalSignature==null) return signature;
- return originalSignature;
- }
// This list records the occurences (in order) of any names specified in the <>
// for a target type for the ITD. So for example, for List<C,B,A> this list
return Method.toString();
} else {
return super.toString();
- }
+ }
}
}
// ResolvedMember parameterizedSignature = getSignature().parameterizedWith(target.getTypeParameters(),genericType,target.isParameterizedType(),typeVariableAliases);
// return new NewFieldTypeMunger(parameterizedSignature,getSuperMethodsCalled(),typeVariableAliases);
// }
+
+ public void setDeclaredSignature(ResolvedMember rm) {
+ declaredSignature = rm;
+ }
+
+ public ResolvedMember getDeclaredSignature() {
+ return declaredSignature;
+ }
}