protected static class JavaConstant.Simple.OfTypeDescription extends JavaConstant.Simple<TypeDescription>
JavaConstant.Simple.Dispatcher, JavaConstant.Simple.OfTrivialValue<S>, JavaConstant.Simple.OfTypeDescription
JavaConstant.Dynamic, JavaConstant.MethodHandle, JavaConstant.MethodType, JavaConstant.Simple<T>, JavaConstant.Visitor<T>
CLASS_DESC, CONSTANT_DESC, DIRECT_METHOD_HANDLE_DESC, DIRECT_METHOD_HANDLE_DESC_KIND, DYNAMIC_CONSTANT_DESC, METHOD_HANDLE_DESC, METHOD_TYPE_DESC, value
Modifier | Constructor and Description |
---|---|
protected |
OfTypeDescription(TypeDescription value)
Creates a type constant.
|
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. |
equals, getTypeDescription, getValue, hashCode, of, ofDescription, ofDescription, ofDescription, ofLoaded, toString, wrap, wrap
protected OfTypeDescription(TypeDescription value)
value
- The represented type.public 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
.public <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.