Package net.bytebuddy.utility
Interface JavaConstant.Visitor<T>
- Type Parameters:
T
- The type of the value that is returned by this visitor.
- All Known Implementing Classes:
JavaConstant.Visitor.NoOp
,JavaConstantValue.Visitor
- Enclosing interface:
- JavaConstant
public static interface JavaConstant.Visitor<T>
A visitor to resolve a
JavaConstant
based on its implementation.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
A non-operational implementation of aJavaConstant.Visitor
for aJavaConstant
. -
Method Summary
Modifier and TypeMethodDescriptiononDynamic
(JavaConstant.Dynamic constant) Invoked on aJavaConstant.Dynamic
constant.onMethodHandle
(JavaConstant.MethodHandle constant) Invoked on a constant that represents aJavaConstant.MethodHandle
.onMethodType
(JavaConstant.MethodType constant) Invoked on a constant that represents aJavaConstant.MethodType
.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.
-
Method Details
-
onValue
Invoked on aJavaConstant.Simple
constant that represents itself. Such values are of typeInteger
,Long
,Float
,Double
orString
.- Parameters:
constant
- The simple constant.- Returns:
- The returned value.
-
onType
Invoked on aJavaConstant.Simple
constant that represents aTypeDescription
.- Parameters:
constant
- The simple constant.- Returns:
- The returned value.
-
onMethodType
Invoked on a constant that represents aJavaConstant.MethodType
.- Parameters:
constant
- The method type constant.- Returns:
- The returned value.
-
onMethodHandle
Invoked on a constant that represents aJavaConstant.MethodHandle
.- Parameters:
constant
- The method handle constant.- Returns:
- The returned value.
-
onDynamic
Invoked on aJavaConstant.Dynamic
constant.- Parameters:
constant
- The dynamic constant.- Returns:
- The returned value.
-