Package org.apache.bcel.generic
Class LDC
java.lang.Object
org.apache.bcel.generic.Instruction
org.apache.bcel.generic.CPInstruction
org.apache.bcel.generic.LDC
- All Implemented Interfaces:
- Cloneable,- ExceptionThrower,- IndexedInstruction,- PushInstruction,- StackProducer,- TypedInstruction
- Direct Known Subclasses:
- LDC_W
LDC - Push item from constant pool.
 
Stack: ... -> ..., item
- 
Field SummaryFields inherited from class org.apache.bcel.generic.CPInstructionindexFields inherited from class org.apache.bcel.generic.Instructionlength, opcode
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidCall corresponding visitor method(s).voiddump(DataOutputStream out) Dump instruction as byte code to stream out.Class<?>[]getType(ConstantPoolGen cpg) getValue(ConstantPoolGen cpg) protected voidinitFromFile(ByteSequence bytes, boolean wide) Reads needed data (for example index) from file.final voidsetIndex(int index) Sets the index to constant pool and adjust size.protected final voidsetSize()Methods inherited from class org.apache.bcel.generic.CPInstructiongetIndex, toString, toStringMethods inherited from class org.apache.bcel.generic.InstructionconsumeStack, copy, equals, getComparator, getLength, getName, getOpcode, hashCode, isValidByte, isValidShort, produceStack, readInstruction, setComparator, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.bcel.generic.StackProducerproduceStack
- 
Constructor Details- 
LDC
 
- 
- 
Method Details- 
acceptCall corresponding visitor method(s). The order is: Call visitor methods of implemented interfaces first, then call methods according to the class hierarchy in descending order, i.e., the most specific visitXXX() call comes last.- Specified by:
- acceptin class- Instruction
- Parameters:
- v- Visitor object
 
- 
dumpDump instruction as byte code to stream out.- Overrides:
- dumpin class- CPInstruction
- Parameters:
- out- Output stream
- Throws:
- IOException- Thrown when an I/O exception of some sort has occurred.
 
- 
getExceptions- Specified by:
- getExceptionsin interface- ExceptionThrower
 
- 
getType- Specified by:
- getTypein interface- TypedInstruction
- Overrides:
- getTypein class- CPInstruction
- Returns:
- type related with this instruction.
 
- 
getValue
- 
initFromFileReads needed data (for example index) from file.- Overrides:
- initFromFilein class- CPInstruction
- Parameters:
- bytes- input stream
- wide- wide prefix?
- Throws:
- IOException- may be thrown if the implementation needs to read data from the file
 
- 
setIndexSets the index to constant pool and adjust size.- Specified by:
- setIndexin interface- IndexedInstruction
- Overrides:
- setIndexin class- CPInstruction
- Parameters:
- index- in constant pool.
 
- 
setSize
 
-