|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.bcel.generic.Instruction
org.apache.bcel.generic.CPInstruction
public abstract class CPInstruction
Abstract super class for instructions that use an index into the constant pool such as LDC, INVOKEVIRTUAL, etc.
ConstantPoolGen,
LDC,
INVOKEVIRTUAL,
Serialized Form| Field Summary | |
|---|---|
protected int |
index
|
| Fields inherited from class org.apache.bcel.generic.Instruction |
|---|
length, opcode |
| Constructor Summary | |
|---|---|
(package private) |
CPInstruction()
Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction(). |
protected |
CPInstruction(short opcode,
int index)
|
| Method Summary | |
|---|---|
void |
dump(java.io.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. |
java.lang.String |
toString(boolean verbose)
Long output format: <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"< constant pool index>">" |
java.lang.String |
toString(ConstantPool cp)
|
| Methods inherited from class org.apache.bcel.generic.Instruction |
|---|
accept, consumeStack, copy, dispose, equals, getComparator, getLength, getName, getOpcode, produceStack, readInstruction, setComparator, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int index
| Constructor Detail |
|---|
CPInstruction()
protected CPInstruction(short opcode,
int index)
index - to constant pool| Method Detail |
|---|
public void dump(java.io.DataOutputStream out)
throws java.io.IOException
dump in class Instructionout - Output stream
java.io.IOExceptionpublic java.lang.String toString(boolean verbose)
toString in class Instructionverbose - long/short format switch
public java.lang.String toString(ConstantPool cp)
toString in class Instruction
protected void initFromFile(ByteSequence bytes,
boolean wide)
throws java.io.IOException
initFromFile in class Instructionbytes - input streamwide - wide prefix?
java.io.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 TypedInstruction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||