Instruction, BranchHandle, InstructionList
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| public static final InstructionHandle[] | EMPTY_ARRAY
Empty array. |
| pack-priv static final InstructionTargeter[] | EMPTY_INSTRUCTION_TARGETER_ARRAY
Empty array. |
| protected int | i_position
Deprecated
(since 6.0) will be made private; do not access directly, use getter/setter
|
| private Instruction | |
| private InstructionHandle | |
| private InstructionHandle | |
| private Set |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addAttribute(final Object
the key object to store/retrieve the attribute key, final Object the attribute to associate with this handle attr)Add an attribute to an instruction handle. |
| protected void | |
| public void | |
| pack-priv void | |
| public Object | getAttribute(final Object
the key object to store/retrieve the attribute key)Gets attribute of an instruction handle. |
| public Collection | |
| public final Instruction | |
| pack-priv static InstructionHandle | |
| public final InstructionHandle | |
| public int | |
| public final InstructionHandle | |
| public InstructionTargeter[] | |
| public boolean | |
| public void | |
| public void | removeAttribute(final Object
the key object to retrieve the attribute key)Delete an attribute of an instruction handle. |
| public void | |
| public void | |
| pack-priv final InstructionHandle | |
| pack-priv void | setPosition(final int pos)
Sets the position, i.e., the byte code offset of the contained instruction. |
| pack-priv final InstructionHandle | |
| public Instruction | swapInstruction(final Instruction i)
Temporarily swap the current instruction, without disturbing anything. |
| public String | Returns: a string representation of the contained instruction.Overrides java. Returns a string representation of the object. |
| public String | toString(final boolean verbose)
Returns: a (verbose) string representation of the contained instruction. |
| 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. |
| attributes | back to summary |
|---|---|
| private Map<Object, Object> attributes | |
| EMPTY_ARRAY | back to summary |
|---|---|
| public static final InstructionHandle[] EMPTY_ARRAY Empty array.
| |
| EMPTY_INSTRUCTION_TARGETER_ARRAY | back to summary |
|---|---|
| pack-priv static final InstructionTargeter[] EMPTY_INSTRUCTION_TARGETER_ARRAY Empty array. | |
| i_position | back to summary |
|---|---|
| protected int i_position
Deprecated (since 6.0) will be made private; do not access directly, use getter/setter | |
| instruction | back to summary |
|---|---|
| private Instruction instruction | |
| next | back to summary |
|---|---|
| private InstructionHandle next | |
| prev | back to summary |
|---|---|
| private InstructionHandle prev | |
| targeters | back to summary |
|---|---|
| private Set<InstructionTargeter> targeters | |
| InstructionHandle | back to summary |
|---|---|
| protected InstructionHandle(final Instruction i) | |
| accept | back to summary |
|---|---|
| public void accept(final Visitor v) Convenience method, simply calls accept() on the contained instruction.
| |
| addAttribute | back to summary |
|---|---|
| public void addAttribute(final Object key, final Object attr) Add an attribute to an instruction handle. | |
| addHandle | back to summary |
|---|---|
| protected void addHandle()
Deprecated Does nothing as of 6.3.1. Does nothing.
| |
| addTargeter | back to summary |
|---|---|
| public void addTargeter(final InstructionTargeter t) Denote this handle is being referenced by t. | |
| dispose | back to summary |
|---|---|
| pack-priv void dispose() Delete contents, i.e., remove user access. | |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(final Object key) Gets attribute of an instruction handle.
| |
| getAttributes | back to summary |
|---|---|
public Collection
| |
| getInstruction | back to summary |
|---|---|
| public final Instruction getInstruction() | |
| getInstructionHandle | back to summary |
|---|---|
| pack-priv static InstructionHandle getInstructionHandle(final Instruction i) Factory method. | |
| getNext | back to summary |
|---|---|
| public final InstructionHandle getNext() | |
| getPosition | back to summary |
|---|---|
public int getPosition()
| |
| getPrev | back to summary |
|---|---|
| public final InstructionHandle getPrev() | |
| getTargeters | back to summary |
|---|---|
public InstructionTargeter[] getTargeters()
| |
| hasTargeters | back to summary |
|---|---|
| public boolean hasTargeters() | |
| removeAllTargeters | back to summary |
|---|---|
| public void removeAllTargeters() Remove all targeters, if any. | |
| removeAttribute | back to summary |
|---|---|
| public void removeAttribute(final Object key) Delete an attribute of an instruction handle.
| |
| removeTargeter | back to summary |
|---|---|
| public void removeTargeter(final InstructionTargeter t) Denote this handle isn't referenced anymore by t. | |
| setInstruction | back to summary |
|---|---|
| public void setInstruction(final Instruction i) Replace current instruction contained in this handle. Old instruction is disposed using Instruction.dispose(). | |
| setNext | back to summary |
|---|---|
pack-priv final InstructionHandle setNext(final InstructionHandle next)
| |
| setPosition | back to summary |
|---|---|
| pack-priv void setPosition(final int pos) Sets the position, i.e., the byte code offset of the contained instruction. | |
| setPrev | back to summary |
|---|---|
pack-priv final InstructionHandle setPrev(final InstructionHandle prev)
| |
| swapInstruction | back to summary |
|---|---|
| public Instruction swapInstruction(final Instruction i) Temporarily swap the current instruction, without disturbing anything. Meant to be used by a debugger, implementing breakpoints. Current instruction is returned. Warning if this is used on a BranchHandle then some methods such as getPosition() will still refer to the original cached instruction, whereas other BH methods may affect the cache and the replacement instruction. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| toString | back to summary |
|---|---|
public String toString(final boolean verbose)
| |
| 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.
| |