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

public sealed Interface DoubleEntry

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

Models a CONSTANT_Double_info structure, representing a double constant, in the constant pool of a class file.

The use of a DoubleEntry is modeled by a double. Conversions are through ConstantPoolBuilder#doubleEntry and doubleValue(). In the conversions, all NaN values of the double may or may not be collapsed into a single "canonical" NaN value.

A double 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::doubleEntry

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

the double value
doubleValue
()

Returns the double value.

public default TypeKind
typeKind()

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

Returns the data type of this constant.

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

Method Detail

doubleValueback to summary
public double doubleValue()

Returns the double value.

Returns:double

the double value

See Also
ConstantPoolBuilder::doubleEntry(double)
typeKindback to summary
public default TypeKind typeKind()

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

Doc from java.lang.classfile.constantpool.LoadableConstantEntry.typeKind.

Returns the data type of this constant.

If the data type is of category 2, this constant must be loaded with ldc2_w; otherwise, the data type is of category 1, and this constant must be loaded with ldc or ldc_w.

Annotations
@Override