}
public IWeaveRequestor getRequestor() {
- return new IWeaveRequestor() {
- public void acceptResult(IUnwovenClassFile result) {
- try {
- writeZipEntry(result.getFilename(), result.getBytes());
- } catch (IOException ex) {
- }
- }
-
- public void processingReweavableState() {
- }
-
- public void addingTypeMungers() {
- }
-
- public void weavingAspects() {
- }
-
- public void weavingClasses() {
- }
-
- public void weaveCompleted() {
- }
- };
+ return new WeaveRequestor();
}
});
// /* BUG 40943*/
return c;
}
+ private class WeaveRequestor implements IWeaveRequestor {
+ public void acceptResult(IUnwovenClassFile result) {
+ try {
+ writeZipEntry(result.getFilename(), result.getBytes());
+ } catch (IOException ex) {
+ }
+ }
+
+ public void processingReweavableState() {}
+
+ public void addingTypeMungers() {}
+
+ public void weavingAspects() {}
+
+ public void weavingClasses() {}
+
+ public void weaveCompleted() {}
+ }
+
private Set<IProgramElement> candidatesForRemoval = null;
// variation of "weave" that sources class files from an external source.
}
public IWeaveRequestor getRequestor() {
- return new IWeaveRequestor() {
-
- public void acceptResult(IUnwovenClassFile result) {
- if (wovenClass == null) {
- wovenClass = result;
- String name = result.getClassName();
- if (shouldDump(name.replace('/', '.'), false)) {
- dump(name, result.getBytes(), false);
- }
- } else {
- // Classes generated by weaver e.g. around closure advice
- String className = result.getClassName();
- byte[] resultBytes = result.getBytes();
-
- if (SimpleCacheFactory.isEnabled()) {
- SimpleCache lacache=SimpleCacheFactory.createSimpleCache();
- lacache.put(result.getClassName(), wovenClass.getBytes(), result.getBytes());
- lacache.addGeneratedClassesNames(wovenClass.getClassName(), wovenClass.getBytes(), result.getClassName());
- }
+ return new WeaveRequestor();
+ }
- generatedClasses.put(wovenClass.getClassName(), wovenClass);
- generatedClassHandler.acceptClass(className, null, resultBytes);
+ private class WeaveRequestor implements IWeaveRequestor {
+ @Override
+ public void acceptResult(IUnwovenClassFile result) {
+ if (wovenClass == null) {
+ wovenClass = result;
+ String name = result.getClassName();
+ if (shouldDump(name.replace('/', '.'), false)) {
+ dump(name, result.getBytes(), false);
+ }
+ } else {
+ // Classes generated by weaver e.g. around closure advice
+ String className = result.getClassName();
+ byte[] resultBytes = result.getBytes();
+
+ if (SimpleCacheFactory.isEnabled()) {
+ SimpleCache lacache=SimpleCacheFactory.createSimpleCache();
+ lacache.put(result.getClassName(), wovenClass.getBytes(), result.getBytes());
+ lacache.addGeneratedClassesNames(wovenClass.getClassName(), wovenClass.getBytes(), result.getClassName());
}
- }
- public void processingReweavableState() {
+ generatedClasses.put(wovenClass.getClassName(), wovenClass);
+ generatedClassHandler.acceptClass(className, null, resultBytes);
}
+ }
- public void addingTypeMungers() {
- }
+ public void processingReweavableState() {}
- public void weavingAspects() {
- }
+ public void addingTypeMungers() {}
- public void weavingClasses() {
- }
+ public void weavingAspects() {}
- public void weaveCompleted() {
- // ResolvedType.resetPrimitives();
- if (delegateForCurrentClass != null) {
- delegateForCurrentClass.weavingCompleted();
- }
- // ResolvedType.resetPrimitives();
- // bcelWorld.discardType(typeBeingProcessed.getResolvedTypeX()); // work in progress
+ public void weavingClasses() {}
+
+ public void weaveCompleted() {
+ // ResolvedType.resetPrimitives();
+ if (delegateForCurrentClass != null) {
+ delegateForCurrentClass.weavingCompleted();
}
- };
+ // ResolvedType.resetPrimitives();
+ // bcelWorld.discardType(typeBeingProcessed.getResolvedTypeX()); // work in progress
+ }
}
}