@HashCodeAndEqualsPlugin.Enhance public static class ConstantValue.Simple extends Object implements ConstantValue
ConstantValue.Simple| Modifier | Constructor and Description |
|---|---|
protected |
Simple(StackManipulation stackManipulation,
TypeDescription typeDescription)
Creates a simple constant value.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
getTypeDescription()
Returns a description of the type of this constant.
|
StackManipulation |
toStackManipulation()
Returns a stack manipulation loading this value.
|
static ConstantValue |
wrap(Object value)
Returns a constant value for the supplied constant value.
|
static ConstantValue |
wrapOrNull(Object value)
Returns a constant value for the supplied constant value.
|
protected Simple(StackManipulation stackManipulation, TypeDescription typeDescription)
stackManipulation - A stack manipulation that loads a constant.typeDescription - The description of the constant value's type.public static ConstantValue wrap(Object value)
value - The value to represent as a constant.@MaybeNull public static ConstantValue wrapOrNull(Object value)
value - The value to represent as a constant.null if the
supplied value is not representable as a compile-time constant.public TypeDescription getTypeDescription()
getTypeDescription in interface ConstantValuepublic StackManipulation toStackManipulation()
toStackManipulation in interface ConstantValueCopyright © 2014–2023. All rights reserved.