|
TechTrader Bytecode Toolkit | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.techtrader.modules.tools.bytecode.ExceptionHandler
Represents a try {} catch() {} statement in bytecode.
Constructor Summary | |
protected |
ExceptionHandler(Code owner)
Protected constructor. |
Method Summary | |
void |
acceptVisit(BCVisitor visit)
|
protected void |
copy(ExceptionHandler orig)
|
Class |
getCatchType()
Get the class of the catch() type; returns null for catch-all clauses used to implement finally blocks. |
int |
getCatchTypeIndex()
Get the index into the constant pool of the ClassEntry describing the Exception type this handler catches. |
String |
getCatchTypeName()
Get the class of the catch() type; returns null for catch-all clauses used to implement finally blocks. |
int |
getEndPc()
Get the program counter end position for this exception handler. |
int |
getHandlerPc()
Get the start of the actual exception handler code. |
Instruction |
getHandlerStart()
Get the instruction marking the beginning of the catch {} block. |
int |
getStartPc()
Get the program counter start position for this exception handler. |
Instruction |
getTryEnd()
Get the instruction at the end of the try {} block. |
Instruction |
getTryStart()
Get the instruction marking the beginning of the try {} block. |
protected void |
invalidate()
Used to invalidate the handler when it is removed from the code block. |
protected void |
readData(DataInput in)
|
void |
setCatchType(Class type)
Set the class of the catch() type, or null for catch-all clauses used for finally blocks. |
void |
setCatchTypeIndex(int catchTypeIndex)
Set the index into the constant pool of the ClassEntry describing the Exception type this handler catches. |
void |
setCatchTypeName(String name)
Set the class of the catch() type, or null for catch-all clauses used with finally blocks. |
void |
setEndPc(int endPc)
Set the program counter end position for this exception handler. |
void |
setHandlerPc(int handlerPc)
Get the start of the actual exception handler code. |
void |
setHandlerStart(Instruction instruction)
Set the Instruction marking the beginning of the catch block. |
void |
setMarkers(List opcodes)
Use the byte indexes read from the .class file to calculate and set references to the target instruction(s) for this ptr. |
void |
setStartPc(int startPc)
Set the program counter start position for this exception handler. |
void |
setTryEnd(Instruction instruction)
Set the Instruction at the end of the try block. |
void |
setTryStart(Instruction instruction)
Set the Instruction marking the beginning of the try block. |
protected void |
writeData(DataOutput out)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected ExceptionHandler(Code owner)
Method Detail |
protected void invalidate()
public int getStartPc()
public void setStartPc(int startPc)
public void setTryStart(Instruction instruction)
public Instruction getTryStart()
public int getEndPc()
public void setEndPc(int endPc)
public void setTryEnd(Instruction instruction)
public Instruction getTryEnd()
public int getHandlerPc()
public void setHandlerPc(int handlerPc)
public void setHandlerStart(Instruction instruction)
public Instruction getHandlerStart()
public int getCatchTypeIndex()
public void setCatchTypeIndex(int catchTypeIndex)
public String getCatchTypeName()
public void setCatchTypeName(String name)
public Class getCatchType() throws ClassNotFoundException
public void setCatchType(Class type)
public void setMarkers(List opcodes)
codes
- the list of opcodes in the methodprotected void copy(ExceptionHandler orig)
protected void readData(DataInput in) throws IOException
protected void writeData(DataOutput out) throws IOException
public void acceptVisit(BCVisitor visit)
|
TechTrader Bytecode Toolkit | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |