Package serp.bytecode
Class Code.CodeIterator
- java.lang.Object
-
- serp.bytecode.Code.CodeIterator
-
- All Implemented Interfaces:
java.util.Iterator,java.util.ListIterator
- Enclosing class:
- Code
private class Code.CodeIterator extends java.lang.Object implements java.util.ListIteratorHelper class to handle invalidation of instructions on removal and notification of modification on addition.
-
-
Constructor Summary
Constructors Constructor Description CodeIterator(CodeEntry entry, int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.Object obj)private voidaddInternal(java.lang.Object obj)booleanhasNext()booleanhasPrevious()private intinitIndex()java.lang.Objectnext()intnextIndex()java.lang.Objectprevious()intpreviousIndex()voidremove()private voidreplaceTarget(Instruction orig, Instruction replace)voidset(java.lang.Object obj)
-
-
-
Field Detail
-
UNSET
public static final int UNSET
- See Also:
- Constant Field Values
-
_bn
private CodeEntry _bn
-
_last
private Instruction _last
-
_index
private int _index
-
-
Constructor Detail
-
CodeIterator
public CodeIterator(CodeEntry entry, int index)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator- Specified by:
hasNextin interfacejava.util.ListIterator
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPreviousin interfacejava.util.ListIterator
-
next
public java.lang.Object next()
- Specified by:
nextin interfacejava.util.Iterator- Specified by:
nextin interfacejava.util.ListIterator
-
nextIndex
public int nextIndex()
- Specified by:
nextIndexin interfacejava.util.ListIterator
-
previous
public java.lang.Object previous()
- Specified by:
previousin interfacejava.util.ListIterator
-
previousIndex
public int previousIndex()
- Specified by:
previousIndexin interfacejava.util.ListIterator
-
initIndex
private int initIndex()
-
add
public void add(java.lang.Object obj)
- Specified by:
addin interfacejava.util.ListIterator
-
addInternal
private void addInternal(java.lang.Object obj)
-
set
public void set(java.lang.Object obj)
- Specified by:
setin interfacejava.util.ListIterator
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator- Specified by:
removein interfacejava.util.ListIterator
-
replaceTarget
private void replaceTarget(Instruction orig, Instruction replace)
-
-