Package serp.bytecode.lowlevel
Class NameAndTypeEntry
- java.lang.Object
-
- serp.bytecode.lowlevel.Entry
-
- serp.bytecode.lowlevel.NameAndTypeEntry
-
- All Implemented Interfaces:
VisitAcceptor
public class NameAndTypeEntry extends Entry
Entry containing indexes referencing a name and a descriptor. Used to describe fields and methods of other classes referenced by opcodes.- Author:
- Abe White
-
-
Field Summary
-
Fields inherited from class serp.bytecode.lowlevel.Entry
CLASS, DOUBLE, FIELD, FLOAT, INT, INTERFACEMETHOD, INVOKEDYNAMIC, LONG, METHOD, METHODHANDLE, METHODTYPE, NAMEANDTYPE, STRING, UTF8
-
-
Constructor Summary
Constructors Constructor Description NameAndTypeEntry()
Default constructor.NameAndTypeEntry(int nameIndex, int descriptorIndex)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptVisit(BCVisitor visit)
Accept a visit from aBCVisitor
, calling the appropriate methods to notify the visitor that it has entered this entity, and to provide it with the proper callbacks for each sub-entity owned by this one.UTF8Entry
getDescriptorEntry()
Return the descriptor's referencedUTF8Entry
.int
getDescriptorIndex()
Return the constant pool index of theUTF8Entry
containing the descriptor for this entity.UTF8Entry
getNameEntry()
Return the name's referencedUTF8Entry
.int
getNameIndex()
Return the constant pool index of theUTF8Entry
containing the name of this entity.int
getType()
Return the type code for this entry type.void
setDescriptorIndex(int descriptorIndex)
Set the constant pool index of aUTF8Entry
containing the descriptor for this entity.void
setNameIndex(int nameIndex)
Set the constant pool index of theUTF8Entry
containing the name of this entity.
-
-
-
Method Detail
-
getType
public int getType()
Description copied from class:Entry
Return the type code for this entry type.
-
getNameIndex
public int getNameIndex()
Return the constant pool index of theUTF8Entry
containing the name of this entity.
-
setNameIndex
public void setNameIndex(int nameIndex)
Set the constant pool index of theUTF8Entry
containing the name of this entity.
-
getNameEntry
public UTF8Entry getNameEntry()
Return the name's referencedUTF8Entry
. This method can only be run for entries that have been added to a constant pool.
-
getDescriptorIndex
public int getDescriptorIndex()
Return the constant pool index of theUTF8Entry
containing the descriptor for this entity.
-
setDescriptorIndex
public void setDescriptorIndex(int descriptorIndex)
Set the constant pool index of aUTF8Entry
containing the descriptor for this entity.
-
getDescriptorEntry
public UTF8Entry getDescriptorEntry()
Return the descriptor's referencedUTF8Entry
. This method can only be run for entries that have been added to a constant pool.
-
acceptVisit
public void acceptVisit(BCVisitor visit)
Description copied from interface:VisitAcceptor
Accept a visit from aBCVisitor
, calling the appropriate methods to notify the visitor that it has entered this entity, and to provide it with the proper callbacks for each sub-entity owned by this one.
-
-