List<AjAttribute> l = null;
try {
l = Utility.readAjAttributes(className, javaClass.getAttributes(), getResolvedTypeX().getSourceContext(),
- getResolvedTypeX().getWorld(), AjAttribute.WeaverVersionInfo.UNKNOWN, new BcelConstantPoolReader(javaClass
- .getConstantPool()));
+ getResolvedTypeX().getWorld(), AjAttribute.WeaverVersionInfo.UNKNOWN,
+ new BcelConstantPoolReader(javaClass.getConstantPool()));
} catch (RuntimeException re) {
throw new RuntimeException("Problem processing attributes in " + javaClass.getFileName(), re);
}
} else if (a instanceof AjAttribute.SourceContextAttribute) {
if (getResolvedTypeX().getSourceContext() instanceof SourceContextImpl) {
AjAttribute.SourceContextAttribute sca = (AjAttribute.SourceContextAttribute) a;
- ((SourceContextImpl) getResolvedTypeX().getSourceContext()).configureFromAttribute(sca.getSourceFileName(), sca
- .getLineBreaks());
+ ((SourceContextImpl) getResolvedTypeX().getSourceContext()).configureFromAttribute(sca.getSourceFileName(),
+ sca.getLineBreaks());
setSourcefilename(sca.getSourceFileName());
}
superTypeReference.clear();
superInterfaceReferences.clear();
}
+
+ public boolean isWeavable() {
+ return true;
+ }
}
import org.aspectj.weaver.IClassFileProvider;
import org.aspectj.weaver.IUnwovenClassFile;
import org.aspectj.weaver.IWeaveRequestor;
+import org.aspectj.weaver.MissingResolvedTypeWithKnownSignature;
import org.aspectj.weaver.NewParentTypeMunger;
import org.aspectj.weaver.ReferenceType;
import org.aspectj.weaver.ReferenceTypeDelegate;
}
// If the compilation unit node contained no other types, there is no need to keep it
if (!anyOtherTypeDeclarations) {
- IProgramElement cuParent = parent.getParent();
+ IProgramElement cuParent = compilationUnit.getParent();
if (cuParent != null) {
- cuParent.setParent(null);
- cuParent.removeChild(parent);
+ compilationUnit.setParent(null);
+ cuParent.removeChild(compilationUnit);
}
// need to update some caches and structures too?
((AspectJElementHierarchy) model.getHierarchy()).forget(parent, typeElement);
} else {
((AspectJElementHierarchy) model.getHierarchy()).forget(null, typeElement);
}
+ } else {
+ ((AspectJElementHierarchy) model.getHierarchy()).forget(null, typeElement);
}
}
}
// is possible
classPath.closeArchives();
typeMap.report();
+ typeMap.demote(true);
ResolvedType.resetPrimitives();
}
return typeMap;
}
+ public boolean isLoadtimeWeaving() {
+ return false;
+ }
+
}