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