|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
public abstract static class Bytecodes.Instruction
Field Summary | |
---|---|
protected short |
length
|
protected short |
opcode
|
Constructor Summary | |
---|---|
Bytecodes.Instruction(short opcode,
short length)
|
Method Summary | |
---|---|
abstract void |
accept(Bytecodes.Visitor v)
Call corresponding visitor method(s). |
int |
consumeStack()
|
Bytecodes.Instruction |
copy()
Use with caution, since `BranchInstruction's have a `target' reference which is not copied correctly (only basic types are). |
void |
dump(DataOutputStream out)
Dump instruction as byte code to stream out. |
int |
getLength()
|
short |
getOpcode()
|
protected void |
initFromFile(jq_ConstantPool cp,
jwutil.io.ByteSequence bytes,
boolean wide)
Read needed data (e.g. |
int |
produceStack()
|
static Bytecodes.Instruction |
readInstruction(jq_ConstantPool cp,
jwutil.io.ByteSequence bytes)
Read an instruction from (byte code) input stream and return the appropiate object. |
String |
toString()
|
String |
toString(boolean verbose)
Long output format: <name of opcode> "["<opcode number>"]" "("<length of instruction>")" |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected short length
protected short opcode
Constructor Detail |
---|
public Bytecodes.Instruction(short opcode, short length)
Method Detail |
---|
public void dump(DataOutputStream out) throws IOException
out
- Output stream
IOException
public String toString(boolean verbose)
verbose
- long/short format switch
public String toString()
toString
in class Object
public Bytecodes.Instruction copy()
Bytecodes.BranchInstruction
protected void initFromFile(jq_ConstantPool cp, jwutil.io.ByteSequence bytes, boolean wide) throws IOException
cp
- constant pool of class we are readingbytes
- byte sequence to read fromwide
- "wide" instruction flag
IOException
public static final Bytecodes.Instruction readInstruction(jq_ConstantPool cp, jwutil.io.ByteSequence bytes) throws IOException
cp
- constant pool of class we are reading frombytes
- sequence of bytes to read
IOException
public int consumeStack()
public int produceStack()
public short getOpcode()
public int getLength()
public abstract void accept(Bytecodes.Visitor v)
v
- Visitor object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |