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 TypeMethodDescriptionvoidprivate voidaddInternal(Object obj) booleanhasNext()booleanprivate intnext()intprevious()intvoidremove()private voidreplaceTarget(Instruction orig, Instruction replace) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
hasNextin interfaceIterator- Specified by:
hasNextin interfaceListIterator
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceListIterator
-
next
- Specified by:
nextin interfaceIterator- Specified by:
nextin interfaceListIterator
-
nextIndex
public int nextIndex()- Specified by:
nextIndexin interfaceListIterator
-
previous
- Specified by:
previousin interfaceListIterator
-
previousIndex
public int previousIndex()- Specified by:
previousIndexin interfaceListIterator
-
initIndex
private int initIndex() -
add
- Specified by:
addin interfaceListIterator
-
addInternal
-
set
- Specified by:
setin interfaceListIterator
-
remove
public void remove()- Specified by:
removein interfaceIterator- Specified by:
removein interfaceListIterator
-
replaceTarget
-