com.jeffpalm.basic.bytecode.base
Class Code
java.lang.Object
com.jeffpalm.basic.bytecode.base.Code
- All Implemented Interfaces:
- ICode, ICodeGenerator, IMutableCode, IDumpable
public final class Code
- extends java.lang.Object
- implements IMutableCode
| Nested classes/interfaces inherited from interface com.jeffpalm.basic.bytecode.ICode |
ICode.Iterator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Code
public Code(IConstantPool cp)
length
public int length()
- Specified by:
length in interface ICode
size
public int size()
- Specified by:
size in interface ICode
append
public int append(Instruction instr)
- Specified by:
append in interface IMutableCode
instructions
public Instruction instructions(int i)
- Specified by:
instructions in interface ICode
getAtLabel
public Instruction getAtLabel(int label)
- Specified by:
getAtLabel in interface ICode
insertAfter
public boolean insertAfter(Instruction newInstr,
Instruction target)
- Specified by:
insertAfter in interface IMutableCode
insertBefore
public boolean insertBefore(Instruction newInstr,
Instruction target)
- Specified by:
insertBefore in interface IMutableCode
insertAtLabel
public boolean insertAtLabel(Instruction newInstr,
int label)
- Specified by:
insertAtLabel in interface IMutableCode
iterator
public ICode.Iterator iterator()
- Specified by:
iterator in interface ICode
clear
public void clear()
- Specified by:
clear in interface IMutableCode
gen
public void gen(ICodeStream code)
throws java.io.IOException
- Specified by:
gen in interface ICodeGenerator
- Throws:
java.io.IOException
dump
public void dump(IAppendable out)
- Specified by:
dump in interface IDumpable