net.sf.rej.java
Class Code
java.lang.Object
net.sf.rej.java.Code
public class Code
- extends java.lang.Object
Code
class models a block of code.
- Author:
- Sami Koivu
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Code
public Code(ByteParser parser,
ConstantPool pool)
Code
public Code(ConstantPool pool)
insertLabels
public void insertLabels(java.util.List<Label> labels)
- Inserts Labels into correct positions based on the pc information of the
label.
- Parameters:
labels
- List A list object containing labels
printCode
public void printCode(java.io.PrintStream out,
LineNumberTableAttribute lnAttr,
LocalVariableTableAttribute lvAttr)
- Debug type dump of instructions to System.out
- Parameters:
out
- the stream in which to dump the code.lnAttr
- LineNumberTableAttributelvAttr
- LocalVariableTableAttribute
getData
public byte[] getData()
getInstructions
public java.util.List<Instruction> getInstructions()
createDecompilationContext
public DecompilationContext createDecompilationContext()
addInstructionAtPC
public void addInstructionAtPC(int pc,
Instruction instruction)
appendInstruction
public void appendInstruction(Instruction instruction)
add
public void add(int index,
Instruction instruction)
add
public void add(int index,
java.util.List<Instruction> instructions)
getPosition
public int getPosition(Instruction instruction)
remove
public void remove(Instruction instruction)
updateLabelPositions
public void updateLabelPositions()
getMaxPC
public int getMaxPC()
moveUp
public void moveUp(Instruction instruction)
moveDown
public void moveDown(Instruction instruction)
setLineNumberTable
public void setLineNumberTable(LineNumberTableAttribute lineNumbers)
setLocalVariableTable
public void setLocalVariableTable(LocalVariableTableAttribute lvta)
setExceptions
public void setExceptions(Exceptions exceptions)