Class NameSignatureInstruction
java.lang.Object
org.apache.bcel.generic.Instruction
org.apache.bcel.generic.CPInstruction
org.apache.bcel.generic.NameSignatureInstruction
- All Implemented Interfaces:
Cloneable, IndexedInstruction, TypedInstruction
Super class for FieldOrMethod and INVOKEDYNAMIC, since they both have names and signatures
- Since:
- 6.0
-
Field Summary
Fields inherited from class CPInstruction
indexFields inherited from class Instruction
length, opcode -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a NameSignatureInstruction.NameSignatureInstruction(short opcode, int index) Constructs a NameSignatureInstruction. -
Method Summary
Modifier and TypeMethodDescriptiongetName(ConstantPoolGen cpg) Gets the name of the referenced method or field.Gets the name and type constant.Gets the signature of the referenced method or field.Methods inherited from class CPInstruction
dump, getIndex, getType, initFromFile, setIndex, toString, toStringMethods inherited from class Instruction
accept, consumeStack, copy, equals, getComparator, getLength, getName, getOpcode, hashCode, isValidByte, isValidShort, produceStack, readInstruction, setComparator, toString
-
Constructor Details
-
NameSignatureInstruction
public NameSignatureInstruction()Constructs a NameSignatureInstruction. -
NameSignatureInstruction
Constructs a NameSignatureInstruction.- Parameters:
opcode- The opcode.index- index into constant pool.
-
-
Method Details
-
getName
Gets the name of the referenced method or field.- Parameters:
cpg- constant pool generator.- Returns:
- name of referenced method/field.
-
getNameAndType
Gets the name and type constant.- Parameters:
cpg- constant pool generator.- Returns:
- The name and type constant.
-
getSignature
Gets the signature of the referenced method or field.- Parameters:
cpg- constant pool generator.- Returns:
- signature of referenced method/field.
-