]> source.dussan.org Git - aspectj.git/commitdiff
246125: removing bcel dependency
authoraclement <aclement>
Fri, 5 Sep 2008 19:30:11 +0000 (19:30 +0000)
committeraclement <aclement>
Fri, 5 Sep 2008 19:30:11 +0000 (19:30 +0000)
weaver/src/org/aspectj/weaver/World.java

index b0aa5458742a8954b16f2fcc9241781a228de646..265ccbc0880aadeab46fa32eb8c973ca174b128f 100644 (file)
@@ -36,11 +36,9 @@ import org.aspectj.bridge.MessageUtil;
 import org.aspectj.bridge.IMessage.Kind;
 import org.aspectj.bridge.context.PinpointingMessageHandler;
 import org.aspectj.weaver.UnresolvedType.TypeKind;
-import org.aspectj.weaver.bcel.BcelObjectType;
 import org.aspectj.weaver.patterns.DeclarePrecedence;
 import org.aspectj.weaver.patterns.PerClause;
 import org.aspectj.weaver.patterns.Pointcut;
-import org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegate;
 import org.aspectj.weaver.tools.PointcutDesignatorHandler;
 import org.aspectj.weaver.tools.Trace;
 import org.aspectj.weaver.tools.TraceFactory;
@@ -975,49 +973,6 @@ public abstract class World implements Dump.INode {
                        return ret;
                }
 
-               public String toString() {
-                       StringBuffer sb = new StringBuffer();
-                       sb.append("types:\n");
-                       sb.append(dumpthem(tMap));
-                       sb.append("expendables:\n");
-                       sb.append(dumpthem(expendableMap));
-                       return sb.toString();
-               }
-
-               private String dumpthem(Map m) {
-                       StringBuffer sb = new StringBuffer();
-
-                       int otherTypes = 0;
-                       int bcelDel = 0;
-                       int refDel = 0;
-
-                       for (Iterator iter = m.entrySet().iterator(); iter.hasNext();) {
-                               Map.Entry entry = (Map.Entry) iter.next();
-                               Object val = entry.getValue();
-                               if (val instanceof WeakReference) {
-                                       val = ((WeakReference) val).get();
-                               } else if (val instanceof SoftReference) {
-                                       val = ((SoftReference) val).get();
-                               }
-                               sb.append(entry.getKey() + "=" + val).append("\n");
-                               if (val instanceof ReferenceType) {
-                                       ReferenceType refType = (ReferenceType) val;
-                                       if (refType.getDelegate() instanceof BcelObjectType) {
-                                               bcelDel++;
-                                       } else if (refType.getDelegate() instanceof ReflectionBasedReferenceTypeDelegate) {
-                                               refDel++;
-                                       } else {
-                                               otherTypes++;
-                                       }
-                               } else {
-                                       otherTypes++;
-                               }
-                       }
-                       sb.append("# BCEL = " + bcelDel + ", # REF = " + refDel + ", # Other = " + otherTypes);
-
-                       return sb.toString();
-               }
-
                // public ResolvedType[] getAllTypes() {
                // List/* ResolvedType */results = new ArrayList();
                //