]> source.dussan.org Git - aspectj.git/commitdiff
Trace loader parent and class lookup
authormwebster <mwebster>
Wed, 4 Oct 2006 14:41:49 +0000 (14:41 +0000)
committermwebster <mwebster>
Wed, 4 Oct 2006 14:41:49 +0000 (14:41 +0000)
loadtime/src/org/aspectj/weaver/loadtime/Aj.java
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java

index f7afb1c6fe1e28ff94f520228a468bc3693b9c7e..2f775a0b107ee8dad55a8c983c0e77122a985fff 100644 (file)
@@ -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) {
index 2e13c5d54edf60928c67e61824b7d1696a915e83..a34454c8dff5348dc496cd3fd559e96db07ac968 100644 (file)
@@ -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;
             }