- All Superinterfaces:
ClassfileElement,WritableElement<PoolEntry>
- All Known Subinterfaces:
AnnotationConstantValueEntry,ClassEntry,ConstantDynamicEntry,ConstantValueEntry,DoubleEntry,DynamicConstantPoolEntry,FieldRefEntry,FloatEntry,IntegerEntry,InterfaceMethodRefEntry,InvokeDynamicEntry,LoadableConstantEntry,LongEntry,MemberRefEntry,MethodHandleEntry,MethodRefEntry,MethodTypeEntry,ModuleEntry,NameAndTypeEntry,PackageEntry,StringEntry,Utf8Entry
- All Known Implementing Classes:
AbstractPoolEntry.AbstractMemberRefEntry,AbstractPoolEntry.ClassEntryImpl,AbstractPoolEntry.ConstantDynamicEntryImpl,AbstractPoolEntry.DoubleEntryImpl,AbstractPoolEntry.FieldRefEntryImpl,AbstractPoolEntry.FloatEntryImpl,AbstractPoolEntry.IntegerEntryImpl,AbstractPoolEntry.InterfaceMethodRefEntryImpl,AbstractPoolEntry.InvokeDynamicEntryImpl,AbstractPoolEntry.LongEntryImpl,AbstractPoolEntry.MethodHandleEntryImpl,AbstractPoolEntry.MethodRefEntryImpl,AbstractPoolEntry.MethodTypeEntryImpl,AbstractPoolEntry.ModuleEntryImpl,AbstractPoolEntry.NameAndTypeEntryImpl,AbstractPoolEntry.PackageEntryImpl,AbstractPoolEntry.StringEntryImpl,AbstractPoolEntry.Utf8EntryImpl
public sealed interface PoolEntry
extends WritableElement<PoolEntry>
permits AnnotationConstantValueEntry, DynamicConstantPoolEntry, LoadableConstantEntry, MemberRefEntry, ModuleEntry, NameAndTypeEntry, PackageEntry
Models an entry in the constant pool of a classfile.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the constant pool this entry is from.intindex()Returns the index within the constant pool corresponding to this entry.bytetag()Returns the constant pool tag that describes the type of this entry.intwidth()Returns the number of constant pool slots this entry consumes.Methods inherited from interface org.glavo.classfile.WritableElement
writeTo
-
Method Details
-
constantPool
ConstantPool constantPool()Returns the constant pool this entry is from.- Returns:
- the constant pool this entry is from
-
tag
byte tag()Returns the constant pool tag that describes the type of this entry.- Returns:
- the constant pool tag that describes the type of this entry
-
index
int index()Returns the index within the constant pool corresponding to this entry.- Returns:
- the index within the constant pool corresponding to this entry
-
width
int width()Returns the number of constant pool slots this entry consumes.- Returns:
- the number of constant pool slots this entry consumes
-