public abstract class CPInstruction extends Instruction implements TypedInstruction, IndexedInstruction
ConstantPoolGen,
LDC,
INVOKEVIRTUAL,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected int |
index |
length, opcode| Modifier | Constructor and Description |
|---|---|
protected |
CPInstruction(short opcode,
int index) |
| Modifier and Type | Method and Description |
|---|---|
void |
dump(DataOutputStream out)
Dump instruction as byte code to stream out.
|
int |
getIndex() |
Type |
getType(ConstantPoolGen cpg) |
protected void |
initFromFile(ByteSequence bytes,
boolean wide)
Read needed data (i.e., index) from file.
|
void |
setIndex(int index)
Set the index to constant pool.
|
String |
toString(boolean verbose)
Long output format:
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")" "<"< constant pool index>">"
|
String |
toString(ConstantPool cp) |
accept, consumeStack, copy, equals, getComparator, getLength, getName, getOpcode, produceStack, readInstruction, setComparator, toStringprotected CPInstruction(short opcode,
int index)
index - to constant poolpublic void dump(DataOutputStream out) throws IOException
dump in class Instructionout - Output streamIOExceptionpublic String toString(boolean verbose)
toString in class Instructionverbose - long/short format switchpublic String toString(ConstantPool cp)
toString in class Instructionprotected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
initFromFile in class Instructionbytes - input streamwide - wide prefix?IOExceptionpublic final int getIndex()
getIndex in interface IndexedInstructionpublic void setIndex(int index)
setIndex in interface IndexedInstructionindex - in constant pool.public Type getType(ConstantPoolGen cpg)
getType in interface TypedInstructionCopyright © 2018–2021 mhoffrogge. All rights reserved.