Enum Class JavaConstantValue.Visitor
java.lang.Object
java.lang.Enum<JavaConstantValue.Visitor>
net.bytebuddy.implementation.bytecode.constant.JavaConstantValue.Visitor
- All Implemented Interfaces:
Serializable
,Comparable<JavaConstantValue.Visitor>
,Constable
,JavaConstant.Visitor<Object>
- Enclosing class:
- JavaConstantValue
public static enum JavaConstantValue.Visitor
extends Enum<JavaConstantValue.Visitor>
implements JavaConstant.Visitor<Object>
A visitor to resolve a
JavaConstant
to a ASM constant pool representation.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.utility.JavaConstant.Visitor
JavaConstant.Visitor.NoOp
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.objectweb.asm.ConstantDynamic
onDynamic
(JavaConstant.Dynamic constant) Invoked on aJavaConstant.Dynamic
constant.org.objectweb.asm.Handle
onMethodHandle
(JavaConstant.MethodHandle constant) Invoked on a constant that represents aJavaConstant.MethodHandle
.org.objectweb.asm.Type
onMethodType
(JavaConstant.MethodType constant) Invoked on a constant that represents aJavaConstant.MethodType
.org.objectweb.asm.Type
onType
(JavaConstant.Simple<TypeDescription> constant) Invoked on aJavaConstant.Simple
constant that represents aTypeDescription
.onValue
(JavaConstant.Simple<?> constant) Invoked on aJavaConstant.Simple
constant that represents itself.static JavaConstantValue.Visitor
Returns the enum constant of this class with the specified name.static JavaConstantValue.Visitor[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Constructor Details
-
Visitor
private Visitor()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
onValue
Invoked on aJavaConstant.Simple
constant that represents itself. Such values are of typeInteger
,Long
,Float
,Double
orString
.- Specified by:
onValue
in interfaceJavaConstant.Visitor<Object>
- Parameters:
constant
- The simple constant.- Returns:
- The returned value.
-
onType
Invoked on aJavaConstant.Simple
constant that represents aTypeDescription
.- Specified by:
onType
in interfaceJavaConstant.Visitor<Object>
- Parameters:
constant
- The simple constant.- Returns:
- The returned value.
-
onMethodType
Invoked on a constant that represents aJavaConstant.MethodType
.- Specified by:
onMethodType
in interfaceJavaConstant.Visitor<Object>
- Parameters:
constant
- The method type constant.- Returns:
- The returned value.
-
onMethodHandle
Invoked on a constant that represents aJavaConstant.MethodHandle
.- Specified by:
onMethodHandle
in interfaceJavaConstant.Visitor<Object>
- Parameters:
constant
- The method handle constant.- Returns:
- The returned value.
-
onDynamic
Invoked on aJavaConstant.Dynamic
constant.- Specified by:
onDynamic
in interfaceJavaConstant.Visitor<Object>
- Parameters:
constant
- The dynamic constant.- Returns:
- The returned value.
-