diff options
author | mwebster <mwebster> | 2006-10-04 14:41:49 +0000 |
---|---|---|
committer | mwebster <mwebster> | 2006-10-04 14:41:49 +0000 |
commit | 81427c39398b2134bffa5485adc0defaee7db607 (patch) | |
tree | 135f6dc28e36c23db5a3c337cdad4ad8d1ec6a42 | |
parent | 6978c427a1da9a291606d1e9a0a7ee98c436efb9 (diff) | |
download | aspectj-81427c39398b2134bffa5485adc0defaee7db607.tar.gz aspectj-81427c39398b2134bffa5485adc0defaee7db607.zip |
Trace loader parent and class lookup
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/Aj.java | 3 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelWorld.java | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/Aj.java b/loadtime/src/org/aspectj/weaver/loadtime/Aj.java index f7afb1c6f..2f775a0b1 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/Aj.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/Aj.java @@ -64,7 +64,8 @@ public class Aj implements ClassPreProcessor { return bytes; } - if (trace.isTraceEnabled()) trace.enter("preProcess",this,new Object[] {className, bytes, loader, Thread.currentThread().getContextClassLoader()}); + if (trace.isTraceEnabled()) trace.enter("preProcess",this,new Object[] {className, bytes, loader}); + if (trace.isTraceEnabled()) trace.event("preProcess",this,new Object[] {loader.getParent(), Thread.currentThread().getContextClassLoader()}); try { synchronized (loader) { diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java index 2e13c5d54..a34454c8d 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java @@ -77,6 +77,8 @@ import org.aspectj.weaver.patterns.FormalBinding; import org.aspectj.weaver.patterns.PerClause; import org.aspectj.weaver.patterns.Pointcut; import org.aspectj.weaver.patterns.SimpleScope; +import org.aspectj.weaver.tools.Trace; +import org.aspectj.weaver.tools.TraceFactory; public class BcelWorld extends World implements Repository { private ClassPathManager classPath; @@ -86,6 +88,8 @@ public class BcelWorld extends World implements Repository { //private ClassPathManager aspectPath = null; // private List aspectPathEntries; + + private static Trace trace = TraceFactory.getTraceFactory().getTrace(BcelWorld.class); // ---- constructors @@ -347,7 +351,9 @@ public class BcelWorld extends World implements Repository { private JavaClass lookupJavaClass(ClassPathManager classPath, String name) { if (classPath == null) { try { - return delegate.loadClass(name); + JavaClass jc = delegate.loadClass(name); + if (trace.isTraceEnabled()) trace.event("lookupJavaClass",this,new Object[] { name, jc }); + return jc; } catch (ClassNotFoundException e) { return null; } |