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

public sealed Interface IntegerEntry

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

Models a CONSTANT_Integer_info structure, or an int constant, in the constant pool of a class file.

The use of a IntegerEntry is modeled by an int. Conversions are through ConstantPoolBuilder#intEntry(int) and intValue().

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

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the int value
intValue
()

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

intValueback to summary
public int intValue()

Returns the int value.

Returns:int

the int value

See Also
ConstantPoolBuilder#intEntry(int)
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