public interface JavaConstant extends ConstantValue
Modifier and Type | Interface and Description |
---|---|
static class |
JavaConstant.Dynamic
Represents a dynamically resolved constant pool entry of a class file.
|
static class |
JavaConstant.MethodHandle
Represents a
java.lang.invoke.MethodHandle object. |
static class |
JavaConstant.MethodType
Represents a
java.lang.invoke.MethodType object. |
static class |
JavaConstant.Simple<T>
|
static interface |
JavaConstant.Visitor<T>
A visitor to resolve a
JavaConstant based on its implementation. |
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(JavaConstant.Visitor<T> visitor)
Applies the supplied visitor to this constant type with its respective callback.
|
Object |
toDescription()
Returns this constant as a Java
java.lang.constant.ConstantDesc if the current VM is of at least version 12. |
getTypeDescription, toStackManipulation
Object toDescription()
java.lang.constant.ConstantDesc
if the current VM is of at least version 12.
If the current VM is of an older version and does not support the type, an exception is thrown.java.lang.constant.ConstantDesc
.<T> T accept(JavaConstant.Visitor<T> visitor)
T
- The type of the value that is returned by the visitor.visitor
- The visitor to dispatch.Copyright © 2014–2023. All rights reserved.