/** * Return true if the method declares that it throws the given * exception type. */ public boolean throwsException(String type) { String[] exceptions = getExceptionNames(); for (int i = 0; i < exceptions.length; i++) if (exceptions[i].equals(type)) return true; return false; }
/** * Return true if the method declares that it throws the given * exception type. */ public boolean throwsException(String type) { String[] exceptions = getExceptionNames(); for (int i = 0; i < exceptions.length; i++) if (exceptions[i].equals(type)) return true; return false; }
void read(Attribute other) { setExceptions(((Exceptions) other).getExceptionNames()); }
void read(Attribute other) { setExceptions(((Exceptions) other).getExceptionNames()); }
public void enterExceptions(Exceptions obj) { int[] indexes = obj.getExceptionIndexes(); String[] names = obj.getExceptionNames(); for (int i = 0; i < indexes.length; i++) println("exception=" + indexes[i] + " <" + names[i] + ">"); }
/** * Return the {@link Class} objects for the exception types for this * method, or an empty array if none. */ public Class[] getExceptionTypes() { String[] names = getExceptionNames(); Class[] types = new Class[names.length]; for (int i = 0; i < names.length; i++) types[i] = Strings.toClass(names[i], getClassLoader()); return types; }
public void enterExceptions(Exceptions obj) { int[] indexes = obj.getExceptionIndexes(); String[] names = obj.getExceptionNames(); for (int i = 0; i < indexes.length; i++) println("exception=" + indexes[i] + " <" + names[i] + ">"); }
/** * Return the {@link Class} objects for the exception types for this * method, or an empty array if none. */ public Class[] getExceptionTypes() { String[] names = getExceptionNames(); Class[] types = new Class[names.length]; for (int i = 0; i < names.length; i++) types[i] = Strings.toClass(names[i], getClassLoader()); return types; }
/** * Return bytecode for the exception types of this * method, or an empty array if none. */ public BCClass[] getExceptionBCs() { String[] names = getExceptionNames(); BCClass[] types = new BCClass[names.length]; for (int i = 0; i < names.length; i++) types[i] = getProject().loadClass(names[i], getClassLoader()); return types; }
/** * Return bytecode for the exception types of this * method, or an empty array if none. */ public BCClass[] getExceptionBCs() { String[] names = getExceptionNames(); BCClass[] types = new BCClass[names.length]; for (int i = 0; i < names.length; i++) types[i] = getProject().loadClass(names[i], getClassLoader()); return types; }