APIdia Launch Partner
Top Description Methods
java.lang.classfile.constantpool

public sealed Interface LongEntry

extends AnnotationConstantValueEntry, ConstantValueEntry
permits LongEntryImpl
Known Direct Implementers
jdk.internal.classfile.impl.AbstractPoolEntry.LongEntryImpl
Imports
java.lang.classfile.TypeKind, jdk.internal.classfile.impl.AbstractPoolEntry

Models a CONSTANT_Long_info structure, or a long constant, in the constant pool of a class file.

The use of a LongEntry is modeled by a long. Conversions are through ConstantPoolBuilder#longEntry(long) and longValue().

A long entry has a width of 2, making its subsequent constant pool index valid and unusable.

Since
24
Java Virtual Machine Specification
4.4.5 The CONSTANT_Long_info and CONSTANT_Double_info Structures
See Also
ConstantPoolBuilder::longEntry

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the long value
longValue
()

Returns the long value.

public default TypeKind

Returns:

the type of the constant
typeKind
()

Overrides default java.lang.classfile.constantpool.LoadableConstantEntry.typeKind.

Returns the type of the constant.

Inherited from java.lang.classfile.constantpool.AnnotationConstantValueEntry:
constantValue
Inherited from java.lang.classfile.constantpool.ConstantValueEntry:
constantValue

Method Detail

longValueback to summary
public long longValue()

Returns the long value.

Returns:long

the long value

See Also
ConstantPoolBuilder::longEntry(long)
typeKindback to summary
public default TypeKind typeKind()

Overrides default java.lang.classfile.constantpool.LoadableConstantEntry.typeKind.

Returns the type of the constant.

Returns:TypeKind

the type of the constant

Annotations
@Override