Package serp.bytecode.lowlevel
Class ComplexEntry
java.lang.Object
serp.bytecode.lowlevel.Entry
serp.bytecode.lowlevel.ComplexEntry
- All Implemented Interfaces:
VisitAcceptor
- Direct Known Subclasses:
FieldEntry,InterfaceMethodEntry,MethodEntry
Base class for field, method, and interface method constant pool
entries. All complex entries reference the
ClassEntry of the
class that owns the entity and a NameAndTypeEntry describing
the entity.- 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
ConstructorsConstructorDescriptionDefault constructor.ComplexEntry(int classIndex, int nameAndTypeIndex) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturn the referencedClassEntry.intReturn the constant pool index of theClassEntrydescribing the owning class of this entity.Return the referencedNameAndTypeEntry.intReturn the constant pool index of theNameAndTypeEntrydescribing this entity.voidsetClassIndex(int classIndex) Set the constant pool index of theClassEntrydescribing the owning class of this entity.voidsetNameAndTypeIndex(int nameAndTypeIndex) Set the constant pool index of theNameAndTypeEntrydescribing this entity.Methods inherited from class serp.bytecode.lowlevel.Entry
create, getIndex, getPool, getType, isWide, read, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface serp.bytecode.visitor.VisitAcceptor
acceptVisit
-
Constructor Details
-
ComplexEntry
public ComplexEntry()Default constructor. -
ComplexEntry
public ComplexEntry(int classIndex, int nameAndTypeIndex) Constructor.- Parameters:
classIndex- the constant pool index of theClassEntrydescribing the owner of this entitynameAndTypeIndex- the constant pool index of theNameAndTypeEntrydescribing this entity
-
-
Method Details
-
getClassIndex
public int getClassIndex()Return the constant pool index of theClassEntrydescribing the owning class of this entity. Defaults to 0. -
setClassIndex
public void setClassIndex(int classIndex) Set the constant pool index of theClassEntrydescribing the owning class of this entity. -
getClassEntry
Return the referencedClassEntry. This method can only be run for entries that have been added to a constant pool. -
getNameAndTypeIndex
public int getNameAndTypeIndex()Return the constant pool index of theNameAndTypeEntrydescribing this entity. -
setNameAndTypeIndex
public void setNameAndTypeIndex(int nameAndTypeIndex) Set the constant pool index of theNameAndTypeEntrydescribing this entity. -
getNameAndTypeEntry
Return the referencedNameAndTypeEntry. This method can only be run for entries that have been added to a constant pool.
-