|
|||||||||
| Home >> All >> com >> techtrader >> modules >> tools >> [ bytecode overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.techtrader.modules.tools.bytecode
Class ExceptionHandler

java.lang.Objectcom.techtrader.modules.tools.bytecode.ExceptionHandler
- All Implemented Interfaces:
- InstructionPtr
- public class ExceptionHandler
- extends java.lang.Object
- implements InstructionPtr
- extends java.lang.Object
Represents a try {} catch() {} statement in bytecode.
| Field Summary | |
private int |
_catchTypeIndex
|
private Instruction |
_end
|
private int |
_endPc
|
private Instruction |
_handler
|
private int |
_handlerPc
|
private Code |
_owner
|
private Instruction |
_start
|
private int |
_startPc
|
| Constructor Summary | |
protected |
ExceptionHandler(Code owner)
Protected constructor. |
| Method Summary | |
void |
acceptVisit(com.techtrader.modules.tools.bytecode.visitor.BCVisitor visit)
|
protected void |
copy(ExceptionHandler orig)
|
java.lang.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. |
java.lang.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(java.io.DataInput in)
|
void |
setCatchType(java.lang.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(java.lang.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(java.util.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(java.io.DataOutput out)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
_startPc
private int _startPc
_endPc
private int _endPc
_handlerPc
private int _handlerPc
_catchTypeIndex
private int _catchTypeIndex
_owner
private Code _owner
_start
private Instruction _start
_end
private Instruction _end
_handler
private Instruction _handler
| Constructor Detail |
ExceptionHandler
protected ExceptionHandler(Code owner)
- Protected constructor.
| Method Detail |
invalidate
protected void invalidate()
- Used to invalidate the handler when it is removed from the
code block.
getStartPc
public int getStartPc()
- Get the program counter start position for this exception handler.
This represents an index into the code byte array.
setStartPc
public void setStartPc(int startPc)
- Set the program counter start position for this exception handler.
This represents an index into the code byte array.
setTryStart
public void setTryStart(Instruction instruction)
- Set the Instruction marking the beginning of the try block. The
Instruction must already be a part of the method.
WARNING: if this instruction is deleted, the results are undefined.
getTryStart
public Instruction getTryStart()
- Get the instruction marking the beginning of the try {} block.
WARNING: if this instruction is deleted, the results are undefined.
getEndPc
public int getEndPc()
- Get the program counter end position for this exception handler.
This represents an index into the code byte array.
setEndPc
public void setEndPc(int endPc)
- Set the program counter end position for this exception handler.
This represents an index into the code byte array.
setTryEnd
public void setTryEnd(Instruction instruction)
- Set the Instruction at the end of the try block. The
Instruction must already be a part of the method.
WARNING: if this instruction is deleted, the results are undefined.
getTryEnd
public Instruction getTryEnd()
- Get the instruction at the end of the try {} block.
WARNING: if this instruction is deleted, the results are undefined.
getHandlerPc
public int getHandlerPc()
- Get the start of the actual exception handler code.
This represents an index into the code byte array.
setHandlerPc
public void setHandlerPc(int handlerPc)
- Get the start of the actual exception handler code.
This represents an index into the code byte array.
setHandlerStart
public void setHandlerStart(Instruction instruction)
- Set the Instruction marking the beginning of the catch block. The
Instruction must already be a part of the method.
WARNING: if this instruction is deleted, the results are undefined.
getHandlerStart
public Instruction getHandlerStart()
- Get the instruction marking the beginning of the catch {} block.
WARNING: if this instruction is deleted, the results are undefined.
getCatchTypeIndex
public int getCatchTypeIndex()
- Get the index into the constant pool of the ClassEntry describing
the Exception type this handler catches.
setCatchTypeIndex
public void setCatchTypeIndex(int catchTypeIndex)
- Set the index into the constant pool of the ClassEntry describing
the Exception type this handler catches.
getCatchTypeName
public java.lang.String getCatchTypeName()
- Get the class of the catch() type; returns null for catch-all
clauses used to implement finally blocks.
setCatchTypeName
public void setCatchTypeName(java.lang.String name)
- Set the class of the catch() type, or null for catch-all clauses used
with finally blocks.
getCatchType
public java.lang.Class getCatchType() throws java.lang.ClassNotFoundException
- Get the class of the catch() type; returns null for catch-all
clauses used to implement finally blocks.
setCatchType
public void setCatchType(java.lang.Class type)
- Set the class of the catch() type, or null for catch-all clauses used
for finally blocks.
setMarkers
public void setMarkers(java.util.List opcodes)
- Description copied from interface:
InstructionPtr - Use the byte indexes read from the .class file to calculate and
set references to the target instruction(s) for this ptr.
This method will be called after the byte code
has been read in for the first time.
- Specified by:
setMarkersin interfaceInstructionPtr
copy
protected void copy(ExceptionHandler orig)
readData
protected void readData(java.io.DataInput in) throws java.io.IOException
writeData
protected void writeData(java.io.DataOutput out) throws java.io.IOException
acceptVisit
public void acceptVisit(com.techtrader.modules.tools.bytecode.visitor.BCVisitor visit)
|
|||||||||
| Home >> All >> com >> techtrader >> modules >> tools >> [ bytecode overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.techtrader.modules.tools.bytecode.ExceptionHandler