InstructionList
| Modifier and Type | Field and Description |
|---|---|
| protected int | index
Deprecated
(since 6.0) will be made private; do not access directly, use getter/setter
|
| protected int | position
Deprecated
(since 6.0) will be made private; do not access directly, use getter/setter
|
| protected InstructionHandle | target
Deprecated
(since 6.0) will be made private; do not access directly, use getter/setter
|
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| protected | BranchInstruction(final short
Instruction opcode opcode, final InstructionHandle instruction to branch to target)Common super constructor |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true, if ih is target of this instructionImplements com. Tests whether this targeter targets the specified instruction handle. |
| pack-priv void | dispose()
Overrides com. Inform target that it's not targeted anymore. |
| public void | dump(final DataOutputStream
Output stream out)Overrides com. Dump instruction as byte code to stream out. |
| public final int | |
| protected int | |
| public InstructionHandle | |
| protected int | |
| protected int | getTargetOffset(final InstructionHandle
branch target target)Returns: the offset to 'target' relative to this instruction |
| protected void | initFromFile(final ByteSequence
input stream bytes, final boolean wide prefix? wide)Overrides com. Read needed data (e.g. index) from file. |
| pack-priv static void | notifyTarget(final InstructionHandle oldIh, final InstructionHandle newIh, final InstructionTargeter t)
Used by BranchInstruction, LocalVariableGen, CodeExceptionGen, LineNumberGen |
| protected void | |
| pack-priv void | setOpcode(final short
the opcode opcode)Overrides com. Updates the opcode. |
| protected void | |
| public void | |
| public String | Returns: mnemonic for instructionlong/short format switch verbose)Overrides com. Long output format: <position in byte code> <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"<target instruction>">" "@"<branch target offset> |
| protected int | Returns: additional offset caused by possible change of this instruction's lengthadditional offset caused by preceding (variable length) instructions offset, final int the maximum offset that may be caused by these instructions maxOffset)Called by InstructionList.setPositions when setting the position for every instruction. |
| public void | updateTarget(final InstructionHandle
old target oldIh, final InstructionHandle new target newIh)Implements com. Replaces the target of this targeter from this old handle to the new handle. |
| index | back to summary |
|---|---|
| protected int index
Deprecated (since 6.0) will be made private; do not access directly, use getter/setter | |
| position | back to summary |
|---|---|
| protected int position
Deprecated (since 6.0) will be made private; do not access directly, use getter/setter | |
| target | back to summary |
|---|---|
| protected InstructionHandle target
Deprecated (since 6.0) will be made private; do not access directly, use getter/setter | |
| BranchInstruction | back to summary |
|---|---|
| pack-priv BranchInstruction() Empty constructor needed for Instruction.readInstruction. Not to be used otherwise. | |
| BranchInstruction | back to summary |
|---|---|
| protected BranchInstruction(final short opcode, final InstructionHandle target) Common super constructor
| |
| containsTarget | back to summary |
|---|---|
| public boolean containsTarget(final InstructionHandle ih) Implements com. Doc from com. Tests whether this targeter targets the specified instruction handle.
| |
| dispose | back to summary |
|---|---|
| pack-priv void dispose() Overrides com. Inform target that it's not targeted anymore.
| |
| dump | back to summary |
|---|---|
| public void dump(final DataOutputStream out) throws IOException Overrides com. Dump instruction as byte code to stream out.
| |
| getIndex | back to summary |
|---|---|
public final int getIndex()
| |
| getPosition | back to summary |
|---|---|
protected int getPosition()
| |
| getTarget | back to summary |
|---|---|
public InstructionHandle getTarget()
| |
| getTargetOffset | back to summary |
|---|---|
protected int getTargetOffset()
| |
| getTargetOffset | back to summary |
|---|---|
protected int getTargetOffset(final InstructionHandle target)
| |
| initFromFile | back to summary |
|---|---|
| protected void initFromFile(final ByteSequence bytes, final boolean wide) throws IOException Overrides com. Read needed data (e.g. index) from file. Conversion to a InstructionHandle is done in InstructionList(byte[]).
| |
| notifyTarget | back to summary |
|---|---|
| pack-priv static void notifyTarget(final InstructionHandle oldIh, final InstructionHandle newIh, final InstructionTargeter t) Used by BranchInstruction, LocalVariableGen, CodeExceptionGen, LineNumberGen | |
| setIndex | back to summary |
|---|---|
protected void setIndex(final int index)
| |
| setOpcode | back to summary |
|---|---|
| pack-priv void setOpcode(final short opcode) Overrides com. Updates the opcode. Before changing the opcode, reset the target so that the old instruction is removed from the HashSet and the new one then added.
| |
| setPosition | back to summary |
|---|---|
protected void setPosition(final int position)
| |
| setTarget | back to summary |
|---|---|
| public void setTarget(final InstructionHandle target) Set branch target
| |
| toString | back to summary |
|---|---|
| public String toString(final boolean verbose) Overrides com. Long output format: <position in byte code> <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"<target instruction>">" "@"<branch target offset> | |
| updatePosition | back to summary |
|---|---|
| protected int updatePosition(final int offset, final int maxOffset) Called by InstructionList.setPositions when setting the position for every instruction. In the presence of variable length instructions 'setPositions' performs multiple passes over the instruction list to calculate the correct (byte) positions and offsets by calling this function.
| |
| updateTarget | back to summary |
|---|---|
| public void updateTarget(final InstructionHandle oldIh, final InstructionHandle newIh) Implements com. Doc from com. Replaces the target of this targeter from this old handle to the new handle.
| |