From: aclement Date: Fri, 5 Sep 2008 19:30:11 +0000 (+0000) Subject: 246125: removing bcel dependency X-Git-Tag: V1_6_2~93 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1e9bca041f7d737717f95cf290d72938ffb13048;p=aspectj.git 246125: removing bcel dependency --- diff --git a/weaver/src/org/aspectj/weaver/World.java b/weaver/src/org/aspectj/weaver/World.java index b0aa54587..265ccbc08 100644 --- a/weaver/src/org/aspectj/weaver/World.java +++ b/weaver/src/org/aspectj/weaver/World.java @@ -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(); //