From e1919580e5e3179e42e589292c178f3eb1ac2966 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 14 Mar 2006 15:58:07 +0000 Subject: plugged into the lifecycle method for evicting bcel state. --- weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'weaver') diff --git a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java index 2934e6c6f..2d3999fd8 100644 --- a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java +++ b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java @@ -41,6 +41,7 @@ import org.aspectj.util.FileUtil; import org.aspectj.util.LangUtil; import org.aspectj.weaver.IClassFileProvider; import org.aspectj.weaver.IWeaveRequestor; +import org.aspectj.weaver.bcel.BcelObjectType; import org.aspectj.weaver.bcel.BcelWeaver; import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.UnwovenClassFile; @@ -460,6 +461,7 @@ public class WeavingAdaptor { private List unwovenClasses = new ArrayList(); /* List */ private UnwovenClassFile wovenClass; private boolean isApplyAtAspectJMungersOnly = false; + private BcelObjectType delegate; public WeavingClassFileProvider (String name, byte[] bytes) { this.unwovenClass = new UnwovenClassFile(name,bytes); @@ -469,7 +471,7 @@ public class WeavingAdaptor { dump(name, bytes, true); } - bcelWorld.addSourceObjectType(unwovenClass.getJavaClass()); + delegate = bcelWorld.addSourceObjectType(unwovenClass.getJavaClass()); } public void setApplyAtAspectJMungersOnly() { @@ -518,7 +520,9 @@ public class WeavingAdaptor { public void weavingClasses() {} - public void weaveCompleted() {} + public void weaveCompleted() { + if (delegate!=null) delegate.weavingCompleted(); + } }; } } -- cgit v1.2.3