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

public sealed Interface FloatEntry

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

Models a CONSTANT_Float_info structure, or a float constant, in the constant pool of a class file.

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

Since
24
Java Virtual Machine Specification
4.4.4 The CONSTANT_Integer_info and CONSTANT_Float_info Structures
See Also
ConstantPoolBuilder::floatEntry

Method Summary

Modifier and TypeMethod and Description
public float

Returns:

the float value
floatValue
()

Returns the float 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

floatValueback to summary
public float floatValue()

Returns the float value.

Returns:float

the float value

See Also
ConstantPoolBuilder#floatEntry(float)
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