public class NameAndTypeConstant extends Constant
Constructor and Description |
---|
NameAndTypeConstant(Constant[] pool,
int nameIndex,
int descriptorIndex)
Creates an instance for the specified name and type or method descriptor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescriptor()
Returns the type or method descriptor.
|
java.lang.String |
getName()
Returns the name.
|
java.lang.String |
toString()
Returns constant type, name, and descriptor.
|
extractConstantPool, getConstant
public NameAndTypeConstant(Constant[] pool, int nameIndex, int descriptorIndex)
pool
- Constant pool. Needed to resolve references.nameIndex
- Index of the name in the pool.descriptorIndex
- Index of the type or method descriptor in the pool.public java.lang.String getName()
public java.lang.String getDescriptor()
public java.lang.String toString()
toString
in class java.lang.Object