|
|||||||||
| 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 TableSwitchInstruction

java.lang.Objectcom.techtrader.modules.tools.bytecode.Instruction
com.techtrader.modules.tools.bytecode.JumpInstruction
com.techtrader.modules.tools.bytecode.TableSwitchInstruction
- All Implemented Interfaces:
- Constants, InstructionPtr, com.techtrader.modules.tools.bytecode.visitor.VisitAcceptor
- public class TableSwitchInstruction
- extends JumpInstruction
A TABLESWITCH instruction.
| Field Summary | |
private int |
_high
|
private int |
_low
|
private java.util.List |
_offsets
|
private java.util.List |
_targets
|
| Fields inherited from class com.techtrader.modules.tools.bytecode.JumpInstruction |
_offset, _target |
| Fields inherited from class com.techtrader.modules.tools.bytecode.Instruction |
_byteIndex, _opcode, _opcodeTypes, _owner |
| Constructor Summary | |
protected |
TableSwitchInstruction(Code owner)
|
| Method Summary | |
void |
acceptVisit(com.techtrader.modules.tools.bytecode.visitor.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 object. |
void |
addTarget(Instruction target)
|
private Instruction |
findTarget(int jumpByteIndex,
java.util.List inss)
|
int |
getDefaultOffset()
Synonymous with getOffset(). |
Instruction |
getDefaultTarget()
Synonymous with getTarget(). |
int |
getHigh()
|
int |
getLength()
Return the length in bytes of this opcode, including all arguments. |
int |
getLow()
|
int[] |
getOffsets()
|
int |
getStackChange()
Return the number of stack positions this instruction pushes or pops during its execution. |
Instruction[] |
getTargets()
|
void |
readData(java.io.DataInput in)
Read the arguments for this opcode from the given stream. |
void |
setDefaultOffset(int offset)
Synonymous with setOffset(). |
void |
setDefaultTarget(Instruction jpt)
Synonymous with setTarget(). |
void |
setHigh(int high)
|
void |
setLow(int low)
|
void |
setMarkers(java.util.List inss)
Use the byte indexes read from the .class file to calculate and set references to the target instruction(s) for this ptr. |
void |
setOffsets(int[] offsets)
Set the offsets for this switch. |
void |
setTargets(Instruction[] targets)
Set the jumppts for this switch. |
void |
writeData(java.io.DataOutput out)
Write the arguments for this opcode to the given stream. |
| Methods inherited from class com.techtrader.modules.tools.bytecode.JumpInstruction |
copy, equals, getOffset, getTarget, setOffset, setTarget |
| Methods inherited from class com.techtrader.modules.tools.bytecode.Instruction |
getByteIndex, getName, getOpCode, getOwner, invalidate, setByteIndex, setOpCode |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
_low
private int _low
_high
private int _high
_offsets
private java.util.List _offsets
_targets
private java.util.List _targets
| Constructor Detail |
TableSwitchInstruction
protected TableSwitchInstruction(Code owner)
| Method Detail |
getDefaultTarget
public Instruction getDefaultTarget()
- Synonymous with getTarget().
setDefaultTarget
public void setDefaultTarget(Instruction jpt)
- Synonymous with setTarget().
getDefaultOffset
public int getDefaultOffset()
- Synonymous with getOffset().
setDefaultOffset
public void setDefaultOffset(int offset)
- Synonymous with setOffset().
getLow
public int getLow()
setLow
public void setLow(int low)
getHigh
public int getHigh()
setHigh
public void setHigh(int high)
setTargets
public void setTargets(Instruction[] targets)
- Set the jumppts for this switch.
setOffsets
public void setOffsets(int[] offsets)
- Set the offsets for this switch.
getTargets
public Instruction[] getTargets()
getOffsets
public int[] getOffsets()
addTarget
public void addTarget(Instruction target)
getLength
public int getLength()
- Description copied from class:
Instruction - Return the length in bytes of this opcode, including all arguments.
This method should be overridden by opcodes that take arguments.
- Overrides:
getLengthin classJumpInstruction
getStackChange
public int getStackChange()
- Description copied from class:
Instruction - Return the number of stack positions this instruction pushes
or pops during its execution.
- Overrides:
getStackChangein classJumpInstruction
readData
public void readData(java.io.DataInput in) throws java.io.IOException
- Description copied from class:
Instruction - Read the arguments for this opcode from the given stream.
This method should be overridden by opcodes that take arguments.
- Overrides:
readDatain classJumpInstruction
writeData
public void writeData(java.io.DataOutput out) throws java.io.IOException
- Description copied from class:
Instruction - Write the arguments for this opcode to the given stream.
This method should be overridden by opcodes that take arguments.
- Overrides:
writeDatain classJumpInstruction
findTarget
private Instruction findTarget(int jumpByteIndex, java.util.List inss)
setMarkers
public void setMarkers(java.util.List inss)
- 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- Overrides:
setMarkersin classJumpInstruction
acceptVisit
public void acceptVisit(com.techtrader.modules.tools.bytecode.visitor.BCVisitor visit)
- Description copied from interface:
com.techtrader.modules.tools.bytecode.visitor.VisitAcceptor - 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 object.
- Specified by:
acceptVisitin interfacecom.techtrader.modules.tools.bytecode.visitor.VisitAcceptor- Overrides:
acceptVisitin classJumpInstruction
|
|||||||||
| 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