Package serp.bytecode
Class Code.CodeIterator
java.lang.Object
serp.bytecode.Code.CodeIterator
- All Implemented Interfaces:
Iterator
,ListIterator
- Enclosing class:
Code
Helper class to handle invalidation of instructions on removal
and notification of modification on addition.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
addInternal
(Object obj) boolean
hasNext()
boolean
private int
next()
int
previous()
int
void
remove()
private void
replaceTarget
(Instruction orig, Instruction replace) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
UNSET
public static final int UNSET- See Also:
-
_bn
-
_last
-
_index
private int _index
-
-
Constructor Details
-
CodeIterator
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator
- Specified by:
hasNext
in interfaceListIterator
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceListIterator
-
next
- Specified by:
next
in interfaceIterator
- Specified by:
next
in interfaceListIterator
-
nextIndex
public int nextIndex()- Specified by:
nextIndex
in interfaceListIterator
-
previous
- Specified by:
previous
in interfaceListIterator
-
previousIndex
public int previousIndex()- Specified by:
previousIndex
in interfaceListIterator
-
initIndex
private int initIndex() -
add
- Specified by:
add
in interfaceListIterator
-
addInternal
-
set
- Specified by:
set
in interfaceListIterator
-
remove
public void remove()- Specified by:
remove
in interfaceIterator
- Specified by:
remove
in interfaceListIterator
-
replaceTarget
-