Uses of Interface
java.lang.constant.ConstantDesc
Package
Description
Provides classes that are fundamental to the design of the Java
programming language.
Provides classfile parsing, generation, and transformation library.
Provides interfaces describing classfile attributes for the
java.lang.classfile
PREVIEW library.Provides specific components, transformations, and tools built on top of the
java.lang.classfile
PREVIEW library.Provides interfaces describing classfile constant pool entries for the
java.lang.classfile
PREVIEW library.Provides interfaces describing code instructions for the
java.lang.classfile
PREVIEW library.Classes and interfaces to represent nominal descriptors for run-time
entities such as classes or method handles, and classfile entities such as
constant pool entries or
invokedynamic
call sites.The
java.lang.invoke
package provides low-level primitives for interacting
with the Java Virtual Machine.-
Uses of ConstantDesc in java.lang
Modifier and TypeClassDescriptionfinal class
TheDouble
class wraps a value of the primitive typedouble
in an object.static final class
Enum.EnumDesc<E extends Enum<E>>
A nominal descriptor for anenum
constant.final class
TheFloat
class wraps a value of primitive typefloat
in an object.final class
TheInteger
class wraps a value of the primitive typeint
in an object.final class
TheLong
class wraps a value of the primitive typelong
in an object.final class
TheString
class represents character strings. -
Uses of ConstantDesc in java.lang.classfilePREVIEW
Modifier and TypeMethodDescriptionAnnotationValue.OfConstant.constantValue()
Returns the constant.Opcode.constantValue()
Returns constant value for constant instructions, or null otherwise.Modifier and TypeMethodDescriptiondefault CodeBuilderPREVIEW
CodeBuilder.constantInstruction
(OpcodePREVIEW opcode, ConstantDesc value) Generate an instruction pushing a constant onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.constantInstruction
(ConstantDesc value) Generate an instruction pushing a constant onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.ldc
(ConstantDesc value) Generate an instruction pushing an item from the run-time constant pool onto the operand stack -
Uses of ConstantDesc in java.lang.classfile.attributePREVIEW
Modifier and TypeMethodDescriptionConstantValueAttribute.of
(ConstantDesc value) Returns aConstantValue
attribute. -
Uses of ConstantDesc in java.lang.classfile.componentsPREVIEW
Modifier and TypeInterfaceDescriptionstatic interface
Preview.A tree node holdingMap
of nested nodes. -
Uses of ConstantDesc in java.lang.classfile.constantpoolPREVIEW
Modifier and TypeMethodDescriptionAnnotationConstantValueEntry.constantValue()
Returns the constant value.default ConstantDesc
ClassEntry.constantValue()
default ConstantDesc
ConstantDynamicEntry.constantValue()
ConstantValueEntry.constantValue()
Returns the constant value.LoadableConstantEntry.constantValue()
Returns the constant described by this entry.default ConstantDesc
MethodHandleEntry.constantValue()
default ConstantDesc
MethodTypeEntry.constantValue()
Modifier and TypeMethodDescriptionConstantPoolBuilder.annotationConstantValueEntry
(ConstantDesc c) Returns AnAnnotationConstantValueEntry
PREVIEW describing the provided constant.default ConstantValueEntryPREVIEW
ConstantPoolBuilder.constantValueEntry
(ConstantDesc c) Returns AConstantValueEntry
PREVIEW descripbing the provided Integer, Long, Float, Double, or String constant.default LoadableConstantEntryPREVIEW
ConstantPoolBuilder.loadableConstantEntry
(ConstantDesc c) Returns ALoadableConstantEntry
PREVIEW describing the provided constant.Modifier and TypeMethodDescriptiondefault BootstrapMethodEntryPREVIEW
ConstantPoolBuilder.bsmEntry
(DirectMethodHandleDesc methodReference, List<ConstantDesc> arguments) Returns aBootstrapMethodEntry
PREVIEW describing the provided bootstrap method and static arguments. -
Uses of ConstantDesc in java.lang.classfile.instructionPREVIEW
Modifier and TypeMethodDescriptionConstantInstruction.constantValue()
Returns the constant value.Modifier and TypeMethodDescriptiondefault List
<ConstantDesc> InvokeDynamicInstruction.bootstrapArgs()
Returns the bootstrap arguments of the call site. -
Uses of ConstantDesc in java.lang.constant
Modifier and TypeInterfaceDescriptioninterface
A nominal descriptor for aClass
constant.interface
A nominal descriptor for a directMethodHandle
.interface
A nominal descriptor for aMethodHandle
constant.interface
A nominal descriptor for a MethodType constant.Modifier and TypeClassDescriptionclass
A nominal descriptor for a dynamic constant (one described in the constant pool withConstant_Dynamic_info
.)Modifier and TypeFieldDescriptionstatic final ConstantDesc
ConstantDescs.NULL
Nominal descriptor representing the constantnull
Modifier and TypeMethodDescriptionDynamicCallSiteDesc.bootstrapArgs()
ReturnsConstantDesc
s describing the bootstrap arguments for theinvokedynamic
.DynamicConstantDesc.bootstrapArgs()
Returns the bootstrap arguments for this constant.static <T> ConstantDesc
DynamicConstantDesc.ofCanonical
(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc[] bootstrapArgs) Returns a nominal descriptor for a dynamic constant, transforming it into a more specific type if the constant bootstrap is a well-known one and a more specific nominal descriptor type (e.g., ClassDesc) is available.Modifier and TypeMethodDescriptionDynamicConstantDesc.bootstrapArgsList()
Returns the bootstrap arguments for this constant as an immutableList
.Optional
<? extends ConstantDesc> Constable.describeConstable()
Modifier and TypeMethodDescriptionstatic DynamicCallSiteDesc
DynamicCallSiteDesc.of
(DirectMethodHandleDesc bootstrapMethod, String invocationName, MethodTypeDesc invocationType, ConstantDesc... bootstrapArgs) Creates a nominal descriptor for aninvokedynamic
call site.static <T> DynamicConstantDesc
<T> DynamicConstantDesc.of
(DirectMethodHandleDesc bootstrapMethod, ConstantDesc... bootstrapArgs) Returns a nominal descriptor for a dynamic constant whose name parameter isConstantDescs.DEFAULT_NAME
, and whose type parameter is always the same as the bootstrap method return type.static <T> ConstantDesc
DynamicConstantDesc.ofCanonical
(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc[] bootstrapArgs) Returns a nominal descriptor for a dynamic constant, transforming it into a more specific type if the constant bootstrap is a well-known one and a more specific nominal descriptor type (e.g., ClassDesc) is available.static <T> DynamicConstantDesc
<T> DynamicConstantDesc.ofNamed
(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs) Returns a nominal descriptor for a dynamic constant.DynamicCallSiteDesc.withArgs
(ConstantDesc... bootstrapArgs) Returns a nominal descriptor for aninvokedynamic
call site whose bootstrap method, name, and invocation type are the same as this one, but with the specified bootstrap arguments.ModifierConstructorDescriptionprotected
DynamicConstantDesc
(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs) Creates a nominal descriptor for a dynamic constant. -
Uses of ConstantDesc in java.lang.invoke
Modifier and TypeClassDescriptionstatic final class
A nominal descriptor for aVarHandle
constant.