|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.transjvm.InstructionStream
public class InstructionStream
Utility stream for writing instruction codes.
Constructor Summary | |
---|---|
InstructionStream(ByteStream stream,
ConstantPool pool,
Frame frame)
|
Method Summary | |
---|---|
void |
_instanceof(TypeID id)
|
void |
_new(TypeID id)
|
void |
add(int incr)
|
void |
addLocalVariableName(int start,
int length,
java.lang.String name,
TypeID type,
int index)
|
int |
address()
|
void |
anewarray(TypeID id)
|
void |
athrow()
|
void |
bconst(boolean value)
|
void |
beginSub()
|
void |
branchBackwards(int opcode,
int address)
Inserts a backwards branch. |
int |
branchForwards(int opcode)
Inserts a forward branch |
void |
byteArg(int opcode,
int arg)
|
void |
checkcast(TypeID id)
|
void |
close()
|
void |
dconst(double value)
|
void |
dup_x1()
|
void |
dup_x2()
|
void |
dup()
|
void |
dup2_x1()
|
void |
dup2_x2()
|
void |
dup2()
|
void |
endSub()
|
void |
fconst(float f)
|
void |
getfield(FieldID id)
|
Attribute |
getLineNumberTable()
|
Attribute |
getLocalVariableTable()
|
void |
getstatic(FieldID id)
|
void |
handleException(int start,
int end,
TypeID type,
int target)
|
void |
iconst(int value)
|
void |
intArg(int opcode,
int arg)
|
void |
jumpBackwards(int address)
Inserts a backwards jump. |
int |
jumpForwards()
Inserts a forward jump. |
void |
lconst(long value)
|
void |
line(int line)
Marks start of new source code line, for debugging. |
int |
maxStack()
|
void |
newarray(TypeID component)
|
void |
patch(int address)
Patches a forward jump or branch, to branch to the current address. |
void |
pop2()
|
void |
putfield(FieldID id)
|
void |
putstatic(FieldID id)
|
void |
sconst(java.lang.String s)
|
void |
shortArg(int opcode,
int arg)
|
void |
stackDepth(int depth)
Ensures that the JVM will allocate stack space of no less than depth |
void |
write(int value)
|
void |
writeInt(int value)
|
void |
writeRef(MemberID id)
|
void |
writeShortAt(int address,
int value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InstructionStream(ByteStream stream, ConstantPool pool, Frame frame)
Method Detail |
---|
public int address()
public void writeInt(int value)
public void write(int value)
public Attribute getLineNumberTable()
public void close()
public int maxStack()
public void stackDepth(int depth)
depth.
public void line(int line)
public void byteArg(int opcode, int arg)
public void shortArg(int opcode, int arg)
public void intArg(int opcode, int arg)
public void anewarray(TypeID id)
java.lang.IllegalArgumentException
- if id is a primitive typepublic void athrow()
public void _new(TypeID id)
java.lang.IllegalArgumentException
- if id is a primitive typepublic void checkcast(TypeID id)
java.lang.IllegalArgumentException
- if id is a primitive typepublic void dup()
public void dup2()
public void dup_x1()
public void dup2_x1()
public void dup_x2()
public void dup2_x2()
public void getfield(FieldID id)
public void getstatic(FieldID id)
public void add(int incr)
public void _instanceof(TypeID id)
java.lang.IllegalArgumentException
- if id is a primitive typepublic void writeRef(MemberID id)
public void newarray(TypeID component)
public void lconst(long value)
public void dconst(double value)
public void fconst(float f)
public void sconst(java.lang.String s)
public void bconst(boolean value)
public void iconst(int value)
public void pop2()
public void putfield(FieldID id)
public void putstatic(FieldID id)
public int jumpForwards()
branchForwards(Opcodes.JVM_goto)
public int branchForwards(int opcode)
opcode
- Opcode for the branch.
public void branchBackwards(int opcode, int address)
opcode
- Opcode for the branch.address
- The target address.public void jumpBackwards(int address)
branchBackwards(Opcodes.JVM_goto)
address
- The target address.public void writeShortAt(int address, int value)
public void patch(int address)
address
- the address returned by the coresponding forward jump or branch.public void handleException(int start, int end, TypeID type, int target)
public void beginSub()
public void endSub()
public Attribute getLocalVariableTable()
public void addLocalVariableName(int start, int length, java.lang.String name, TypeID type, int index)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |