AbstractInsnNode objects. This implementation is not thread
safe.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv AbstractInsnNode[] | cache
A cache of the instructions of this list. |
| private AbstractInsnNode | firstInsn
The first instruction in this list. |
| private AbstractInsnNode | lastInsn
The last instruction in this list. |
| private int | size
The number of instructions in this list. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(final MethodVisitor
the method visitor that must visit the instructions. methodVisitor)Makes the given visitor visit all the instructions in this list. |
| public void | add(final AbstractInsnNode
an instruction, which must not belong to any insnNode)InsnList.Adds the given instruction to the end of this list. |
| public void | |
| public void | |
| public boolean | Returns: true if the given instruction belongs to this list.an instruction. insnNode)Returns true if the given instruction belongs to this list. |
| public AbstractInsnNode | Returns: the instruction whose index is given.the index of the instruction that must be returned. index)Returns the instruction whose index is given. |
| public AbstractInsnNode | Returns: the first instruction in this list, or null if the list is empty.Returns the first instruction in this list. |
| public AbstractInsnNode | Returns: the last instruction in this list, or null if the list is empty.Returns the last instruction in this list. |
| public int | Returns: the index of the given instruction in this list. The result of this method is undefined if the given instruction does not belong to this list. Usecontains
to test if an instruction belongs to an instruction list or not.an instruction of this list. insnNode)Returns the index of the given instruction in this list. |
| public void | insert(final AbstractInsnNode
an instruction, which must not belong to any insnNode)InsnList.Inserts the given instruction at the beginning of this list. |
| public void | |
| public void | insert(final AbstractInsnNode
an instruction of this list after which insnNode must be inserted. previousInsn, final AbstractInsnNode the instruction to be inserted, which must not belong to any insnNode)InsnList.Inserts the given instruction after the specified instruction. |
| public void | insert(final AbstractInsnNode
an instruction of this list after which the instructions must be
inserted. previousInsn, final InsnList the instruction list to be inserted, which is cleared during the process. This
list must be different from 'this'. insnList)Inserts the given instructions after the specified instruction. |
| public void | insertBefore(final AbstractInsnNode
an instruction of this list before which insnNode must be inserted. nextInsn, final AbstractInsnNode the instruction to be inserted, which must not belong to any insnNode)InsnList.Inserts the given instruction before the specified instruction. |
| public void | insertBefore(final AbstractInsnNode
an instruction of this list before which the instructions must be
inserted. nextInsn, final InsnList the instruction list to be inserted, which is cleared during the process. This
list must be different from 'this'. insnList)Inserts the given instructions before the specified instruction. |
| public ListIterator | Returns: an iterator over the instructions in this list.Implements java. |
| public ListIterator | Returns: an iterator over the instructions in this list.index of instruction for the iterator to start at. index)Returns an iterator over the instructions in this list. |
| public void | remove(final AbstractInsnNode
the instruction of this list that must be removed. insnNode)Removes the given instruction from this list. |
| pack-priv void | |
| public void | |
| public void | set(final AbstractInsnNode
an instruction of this list. oldInsnNode, final AbstractInsnNode another instruction, which must not belong to any newInsnNode)InsnList.Replaces an instruction of this list with another instruction. |
| public int | Returns: the number of instructions in this list.Returns the number of instructions in this list. |
| public AbstractInsnNode[] | Returns: an array containing all the instructions in this list.Returns an array containing all the instructions in this list. |
| cache | back to summary |
|---|---|
| pack-priv AbstractInsnNode[] cache A cache of the instructions of this list. This cache is used to improve the performance of the
| |
| firstInsn | back to summary |
|---|---|
| private AbstractInsnNode firstInsn The first instruction in this list. May be null. | |
| lastInsn | back to summary |
|---|---|
| private AbstractInsnNode lastInsn The last instruction in this list. May be null. | |
| size | back to summary |
|---|---|
| private int size The number of instructions in this list. | |
| InsnList | back to summary |
|---|---|
| public InsnList() | |
| accept | back to summary |
|---|---|
| public void accept(final MethodVisitor methodVisitor) Makes the given visitor visit all the instructions in this list.
| |
| add | back to summary |
|---|---|
| public void add(final AbstractInsnNode insnNode) Adds the given instruction to the end of this list.
| |
| add | back to summary |
|---|---|
| public void add(final InsnList insnList) Adds the given instructions to the end of this list.
| |
| clear | back to summary |
|---|---|
| public void clear() Removes all the instructions of this list. | |
| contains | back to summary |
|---|---|
| public boolean contains(final AbstractInsnNode insnNode) Returns true if the given instruction belongs to this list. This method always scans the instructions of this list until it finds the given instruction or reaches the end of the list.
| |
| get | back to summary |
|---|---|
| public AbstractInsnNode get(final int index) Returns the instruction whose index is given. This method builds a cache of the instructions in this list to avoid scanning the whole list each time it is called. Once the cache is built, this method runs in constant time. This cache is invalidated by all the methods that modify the list.
| |
| getFirst | back to summary |
|---|---|
| public AbstractInsnNode getFirst() Returns the first instruction in this list.
| |
| getLast | back to summary |
|---|---|
| public AbstractInsnNode getLast() Returns the last instruction in this list.
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(final AbstractInsnNode insnNode) Returns the index of the given instruction in this list. This method builds a cache of the instruction indexes to avoid scanning the whole list each time it is called. Once the cache is built, this method run in constant time. The cache is invalidated by all the methods that modify the list.
| |
| insert | back to summary |
|---|---|
| public void insert(final AbstractInsnNode insnNode) Inserts the given instruction at the beginning of this list.
| |
| insert | back to summary |
|---|---|
| public void insert(final InsnList insnList) Inserts the given instructions at the beginning of this list.
| |
| insert | back to summary |
|---|---|
| public void insert(final AbstractInsnNode previousInsn, final AbstractInsnNode insnNode) Inserts the given instruction after the specified instruction.
| |
| insert | back to summary |
|---|---|
| public void insert(final AbstractInsnNode previousInsn, final InsnList insnList) Inserts the given instructions after the specified instruction.
| |
| insertBefore | back to summary |
|---|---|
| public void insertBefore(final AbstractInsnNode nextInsn, final AbstractInsnNode insnNode) Inserts the given instruction before the specified instruction.
| |
| insertBefore | back to summary |
|---|---|
| public void insertBefore(final AbstractInsnNode nextInsn, final InsnList insnList) Inserts the given instructions before the specified instruction.
| |
| iterator | back to summary |
|---|---|
| public ListIterator Implements java. Returns an iterator over the instructions in this list.
| |
| iterator | back to summary |
|---|---|
| public ListIterator Returns an iterator over the instructions in this list.
| |
| remove | back to summary |
|---|---|
| public void remove(final AbstractInsnNode insnNode) Removes the given instruction from this list.
| |
| removeAll | back to summary |
|---|---|
| pack-priv void removeAll(final boolean mark) Removes all the instructions of this list.
| |
| resetLabels | back to summary |
|---|---|
| public void resetLabels() Resets all the labels in the instruction list. This method should be called before reusing an
instruction list between several | |
| set | back to summary |
|---|---|
| public void set(final AbstractInsnNode oldInsnNode, final AbstractInsnNode newInsnNode) Replaces an instruction of this list with another instruction.
| |
| size | back to summary |
|---|---|
| public int size() Returns the number of instructions in this list.
| |
| toArray | back to summary |
|---|---|
| public AbstractInsnNode[] toArray() Returns an array containing all the instructions in this list.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv AbstractInsnNode | |
| pack-priv AbstractInsnNode | |
| pack-priv AbstractInsnNode |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(final Object
the element to insert o)Implements java. |
| public boolean | hasNext()
Implements java. true if this list iterator has more elements when
traversing the list in the forward direction.
|
| public boolean | hasPrevious()
Implements java. true if this list iterator has more elements when
traversing the list in the reverse direction.
|
| public Object | next()
Implements java. |
| public int | nextIndex()
Implements java. next.
|
| public Object | previous()
Implements java. |
| public int | previousIndex()
Implements java. previous.
|
| public void | remove()
Implements java. next or previous (optional operation).
|
| public void | set(final Object
the element with which to replace the last element returned by
o)next or previousImplements java. next or
previous with the specified element (optional operation).
|
| nextInsn | back to summary |
|---|---|
| pack-priv AbstractInsnNode nextInsn | |
| previousInsn | back to summary |
|---|---|
| pack-priv AbstractInsnNode previousInsn | |
| remove | back to summary |
|---|---|
| pack-priv AbstractInsnNode remove | |
| InsnListIterator | back to summary |
|---|---|
| pack-priv InsnListIterator(final int index) | |
| add | back to summary |
|---|---|
| public void add(final Object o) Implements java. Doc from java. Inserts the specified element into the list (optional operation).
The element is inserted immediately before the element that
would be returned by | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| hasPrevious | back to summary |
|---|---|
| public boolean hasPrevious() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public Object next() Implements java. Doc from java. Returns the next element in the list and advances the cursor position.
This method may be called repeatedly to iterate through the list,
or intermixed with calls to | |
| nextIndex | back to summary |
|---|---|
| public int nextIndex() Implements java. Doc from java. Returns the index of the element that would be returned by a
subsequent call to
| |
| previous | back to summary |
|---|---|
| public Object previous() Implements java. Doc from java. Returns the previous element in the list and moves the cursor
position backwards. This method may be called repeatedly to
iterate through the list backwards, or intermixed with calls to
| |
| previousIndex | back to summary |
|---|---|
| public int previousIndex() Implements java. Doc from java. Returns the index of the element that would be returned by a
subsequent call to
| |
| remove | back to summary |
|---|---|
| public void remove() Implements java. Doc from java. Removes from the list the last element that was returned by
| |
| set | back to summary |
|---|---|
| public void set(final Object o) Implements java. Doc from java. Replaces the last element returned by | |