public class Exceptions extends Attribute
Modifier and Type | Method and Description |
---|---|
void |
acceptVisit(BCVisitor visit)
Accept a visit from a
BCVisitor , calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one. |
void |
addException(BCClass type)
Add an exception to those thrown by this method.
|
void |
addException(Class type)
Add an exception to those thrown by this method.
|
void |
addException(String type)
Add an exception type to those thrown by this method.
|
void |
clear()
Clear this method of all exception declarations.
|
BCClass[] |
getExceptionBCs()
Return bytecode for the exception types of this
method, or an empty array if none.
|
int[] |
getExceptionIndexes()
Return the indexes in the class
ConstantPool of the
ClassEntry s for the exception types thrown by this method, or
an empty array if none. |
String[] |
getExceptionNames()
Return the names of the exception types for this method, or an empty
array if none.
|
Class[] |
getExceptionTypes()
Return the
Class objects for the exception types for this
method, or an empty array if none. |
BCMethod |
getMethod()
Return the owning method.
|
boolean |
removeException(BCClass type)
Remove an exception thrown by this method.
|
boolean |
removeException(Class type)
Remove an exception thrown by this method.
|
boolean |
removeException(String type)
Remove an exception type thrown by this method.
|
void |
setExceptionIndexes(int[] exceptionIndexes)
Set the indexes in the class
ConstantPool of the
ClassEntry s for the exception types thrown by this method. |
void |
setExceptions(BCClass[] exceptions)
Set the checked exceptions thrown by this method.
|
void |
setExceptions(Class[] exceptions)
Set the checked exceptions thrown by this method.
|
void |
setExceptions(String[] exceptions)
Set the checked exceptions thrown by this method.
|
boolean |
throwsException(BCClass type)
Return true if the method declares that it throws the given
exception type.
|
boolean |
throwsException(Class type)
Return true if the method declares that it throws the given
exception type.
|
boolean |
throwsException(String type)
Return true if the method declares that it throws the given
exception type.
|
getClassLoader, getName, getNameIndex, getOwner, getPool, getProject, isValid
addAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, removeAttribute, removeAttribute, setAttributes
public BCMethod getMethod()
public int[] getExceptionIndexes()
ConstantPool
of the
ClassEntry
s for the exception types thrown by this method, or
an empty array if none.public void setExceptionIndexes(int[] exceptionIndexes)
ConstantPool
of the
ClassEntry
s for the exception types thrown by this method. Use
null or an empty array for none.public String[] getExceptionNames()
Class.forName(java.lang.String)
call.public Class[] getExceptionTypes()
Class
objects for the exception types for this
method, or an empty array if none.public BCClass[] getExceptionBCs()
public void setExceptions(String[] exceptions)
public void setExceptions(Class[] exceptions)
public void setExceptions(BCClass[] exceptions)
public void clear()
public boolean removeException(String type)
public boolean removeException(Class type)
public boolean removeException(BCClass type)
public void addException(String type)
public void addException(Class type)
public void addException(BCClass type)
public boolean throwsException(String type)
public boolean throwsException(Class type)
public boolean throwsException(BCClass type)
public void acceptVisit(BCVisitor visit)
VisitAcceptor
BCVisitor
, calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one.Copyright © 2002–2019. All rights reserved.