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
public abstract class ComplexEntry extends Entry
Base class for field, method, and interface method constant pool entries. All complex entries reference theClassEntryof the class that owns the entity and aNameAndTypeEntrydescribing the entity.
-
-
Field Summary
Fields Modifier and Type Field Description private int_classIndexprivate int_nameAndTypeIndex-
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 ComplexEntry()Default constructor.ComplexEntry(int classIndex, int nameAndTypeIndex)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassEntrygetClassEntry()Return the referencedClassEntry.intgetClassIndex()Return the constant pool index of theClassEntrydescribing the owning class of this entity.NameAndTypeEntrygetNameAndTypeEntry()Return the referencedNameAndTypeEntry.intgetNameAndTypeIndex()Return the constant pool index of theNameAndTypeEntrydescribing this entity.(package private) voidreadData(java.io.DataInput in)This method is called after reading the entry type from bytecode.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.(package private) voidwriteData(java.io.DataOutput out)This method is called after writing the entry type to bytecode.-
Methods inherited from class serp.bytecode.lowlevel.Entry
afterModify, beforeModify, create, getIndex, getPool, getType, isWide, read, setIndex, setPool, write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface serp.bytecode.visitor.VisitAcceptor
acceptVisit
-
-
-
-
Constructor Detail
-
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 Detail
-
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
public ClassEntry 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
public NameAndTypeEntry getNameAndTypeEntry()
Return the referencedNameAndTypeEntry. This method can only be run for entries that have been added to a constant pool.
-
readData
void readData(java.io.DataInput in) throws java.io.IOExceptionDescription copied from class:EntryThis method is called after reading the entry type from bytecode. It should read all the data for this entry from the given stream.
-
writeData
void writeData(java.io.DataOutput out) throws java.io.IOExceptionDescription copied from class:EntryThis method is called after writing the entry type to bytecode. It should write all data for this entry to the given stream.
-
-