info.addConcreteMunger(this);
}
if (changed && worthReporting) {
ResolvedType declaringAspect = null;
AsmManager model = ((BcelWorld) getWorld()).getModelAsAsmManager();
if (model != null) {
if (munger instanceof NewParentTypeMunger) {
NewParentTypeMunger nptMunger = (NewParentTypeMunger) munger;
declaringAspect = nptMunger.getDeclaringType();
if (declaringAspect.isParameterizedOrGenericType()) {
declaringAspect = declaringAspect.getRawType();
}
ResolvedType thisAspect = getAspectType();
AsmRelationshipProvider.addRelationship(model, weaver.getLazyClassGen().getType(), munger, thisAspect);
// Add a relationship on the actual declaring aspect too
if (!thisAspect.equals(declaringAspect)) {
// Might be the case the declaring aspect is generic and thisAspect is parameterizing it. In that case
// record the actual parameterizations
ResolvedType target = weaver.getLazyClassGen().getType();
ResolvedType newParent = nptMunger.getNewParent();
IProgramElement thisAspectNode = model.getHierarchy().findElementForType(thisAspect.getPackageName(),
thisAspect.getClassName());
Map<String, List<String>> declareParentsMap = thisAspectNode.getDeclareParentsMap();
if (declareParentsMap == null) {
declareParentsMap = new HashMap<String, List<String>>();
thisAspectNode.setDeclareParentsMap(declareParentsMap);