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 org. |
| pack-priv void | dispose()
Overrides org. |
| public void | dump(final DataOutputStream
Output stream out)Overrides org. |
| public final int | |
| protected int | |
| public InstructionHandle | |
| protected int | |
| protected int | Returns: the offset to 'target' relative to this instructionbranch target target)
|
| protected void | initFromFile(final ByteSequence
input stream bytes, final boolean wide prefix? wide)
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 | |
| protected void | |
| public void | |
| public String | Returns: mnemonic for instructionlong/short format switch verbose)Overrides org. |
| 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 org. |
| 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 org. Doc from org. Checks whether this targeter targets the specified instruction handle.
| |
| dispose | back to summary |
|---|---|
| pack-priv void dispose() Overrides org. Inform target that it's not targeted anymore.
| |
| dump | back to summary |
|---|---|
| public void dump(final DataOutputStream out) throws IOException Overrides org. 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 org. 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)
| |
| setPosition | back to summary |
|---|---|
protected void setPosition(final int position)
| |
| setTarget | back to summary |
|---|---|
| public void setTarget(final InstructionHandle target) Sets branch target
| |
| toString | back to summary |
|---|---|
| public String toString(final boolean verbose) Overrides org. 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 org. Doc from org. Replaces the target of this targeter from this old handle to the new handle.
| |