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 enumA non-operational implementation of aJavaConstant.Visitorfor aJavaConstant. -
Method Summary
Modifier and TypeMethodDescriptiononDynamic(JavaConstant.Dynamic constant) Invoked on aJavaConstant.Dynamicconstant.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.Simpleconstant that represents aTypeDescription.onValue(JavaConstant.Simple<?> constant) Invoked on aJavaConstant.Simpleconstant that represents itself.
-
Method Details
-
onValue
-
onType
Invoked on aJavaConstant.Simpleconstant 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.Dynamicconstant.- Parameters:
constant- The dynamic constant.- Returns:
- The returned value.
-