1 22 23 package org.aspectj.debugger.base; 24 25 import com.sun.jdi.*; 26 import java.util.*; 27 28 36 37 public class AmbiguousClassException extends DebuggerException { 38 public AmbiguousClassException (String className, List classes) { 39 super((new StringWriter(className, classes)) + ""); 40 } 41 42 static class StringWriter { 43 String msg; 44 public StringWriter(String className, List classes) { 45 msg = "The name '" + className + 46 " matches the following classes:" + Consts.newline; 47 Iterator iter = classes.iterator(); 48 while (iter.hasNext()) { 49 msg += " " + ((ReferenceType) iter.next()).name() + Consts.newline; 50 } 51 } 52 53 public String toString() { 54 return msg; 55 } 56 } 57 } 58 | Popular Tags |