public abstract class CPInstruction extends Instruction implements TypedInstruction, IndexedInstruction
ConstantPoolGen,
LDC,
INVOKEVIRTUAL| Modifier and Type | Field and Description |
|---|---|
protected int |
index
Deprecated.
(since 6.0) will be made private; do not access directly, use getter/setter
|
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, hashCode, isValidByte, isValidShort, produceStack, readInstruction, setComparator, toString@Deprecated protected int index
protected CPInstruction(short opcode, int index)
index - to constant poolpublic void dump(DataOutputStream out) throws IOException
dump in class Instructionout - Output streamIOExceptionpublic final int getIndex()
getIndex in interface IndexedInstructionpublic Type getType(ConstantPoolGen cpg)
getType in interface TypedInstructionprotected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
initFromFile in class Instructionbytes - input streamwide - wide prefix?IOException - may be thrown if the implementation needs to read data from the filepublic void setIndex(int index)
setIndex in interface IndexedInstructionindex - in constant pool.public String toString(boolean verbose)
toString in class Instructionverbose - long/short format switchpublic String toString(ConstantPool cp)
toString in class InstructionCopyright © 2004–2022 The Apache Software Foundation. All rights reserved.