Interface PoolEntry
- All Known Subinterfaces:
AnnotationConstantValueEntryPREVIEW
,ClassEntryPREVIEW
,ConstantDynamicEntryPREVIEW
,ConstantValueEntryPREVIEW
,DoubleEntryPREVIEW
,DynamicConstantPoolEntryPREVIEW
,FieldRefEntryPREVIEW
,FloatEntryPREVIEW
,IntegerEntryPREVIEW
,InterfaceMethodRefEntryPREVIEW
,InvokeDynamicEntryPREVIEW
,LoadableConstantEntryPREVIEW
,LongEntryPREVIEW
,MemberRefEntryPREVIEW
,MethodHandleEntryPREVIEW
,MethodRefEntryPREVIEW
,MethodTypeEntryPREVIEW
,ModuleEntryPREVIEW
,NameAndTypeEntryPREVIEW
,PackageEntryPREVIEW
,StringEntryPREVIEW
,Utf8EntryPREVIEW
public sealed interface PoolEntry
permits AnnotationConstantValueEntryPREVIEW, DynamicConstantPoolEntryPREVIEW, LoadableConstantEntryPREVIEW, MemberRefEntryPREVIEW, ModuleEntryPREVIEW, NameAndTypeEntryPREVIEW, PackageEntryPREVIEW
PoolEntry
is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models an entry in the constant pool of a classfile.
- Since:
- 22
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionReturns the constant pool this entry is from.int
index()
Returns the index within the constant pool corresponding to this entry.byte
tag()
Returns the constant pool tag that describes the type of this entry.int
width()
Returns the number of constant pool slots this entry consumes.
-
Field Details
-
TAG_CLASS
-
TAG_DOUBLE
-
TAG_DYNAMIC
-
TAG_FIELDREF
-
TAG_FLOAT
-
TAG_INTEGER
-
TAG_INTERFACE_METHODREF
static final int TAG_INTERFACE_METHODREF- See Also:
-
TAG_INVOKE_DYNAMIC
static final int TAG_INVOKE_DYNAMIC- See Also:
-
TAG_LONG
-
TAG_METHOD_HANDLE
static final int TAG_METHOD_HANDLE- See Also:
-
TAG_METHODREF
-
TAG_METHOD_TYPE
-
TAG_MODULE
-
TAG_NAME_AND_TYPE
-
TAG_PACKAGE
-
TAG_STRING
-
TAG_UTF8
-
-
Method Details
-
constantPool
ConstantPoolPREVIEW 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.- API Note:
TAG_
-prefixed constants in this class, such asTAG_UTF8
, describe the possible return values of this method.- 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
-
PoolEntry
when preview features are enabled.