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 aJavaConstantbased on its implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classJavaConstant.Visitor.NoOpA non-operational implementation of aJavaConstant.Visitorfor aJavaConstant.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TonDynamic(JavaConstant.Dynamic constant)Invoked on aJavaConstant.Dynamicconstant.TonMethodHandle(JavaConstant.MethodHandle constant)Invoked on a constant that represents aJavaConstant.MethodHandle.TonMethodType(JavaConstant.MethodType constant)Invoked on a constant that represents aJavaConstant.MethodType.TonType(JavaConstant.Simple<TypeDescription> constant)Invoked on aJavaConstant.Simpleconstant that represents aTypeDescription.TonValue(JavaConstant.Simple<?> constant)Invoked on aJavaConstant.Simpleconstant that represents itself.
-
-
-
Method Detail
-
onValue
T onValue(JavaConstant.Simple<?> constant)
Invoked on aJavaConstant.Simpleconstant that represents itself. Such values are of typeInteger,Long,Float,DoubleorString.- Parameters:
constant- The simple constant.- Returns:
- The returned value.
-
onType
T onType(JavaConstant.Simple<TypeDescription> constant)
Invoked on aJavaConstant.Simpleconstant that represents aTypeDescription.- Parameters:
constant- The simple constant.- Returns:
- The returned value.
-
onMethodType
T onMethodType(JavaConstant.MethodType constant)
Invoked on a constant that represents aJavaConstant.MethodType.- Parameters:
constant- The method type constant.- Returns:
- The returned value.
-
onMethodHandle
T onMethodHandle(JavaConstant.MethodHandle constant)
Invoked on a constant that represents aJavaConstant.MethodHandle.- Parameters:
constant- The method handle constant.- Returns:
- The returned value.
-
onDynamic
T onDynamic(JavaConstant.Dynamic constant)
Invoked on aJavaConstant.Dynamicconstant.- Parameters:
constant- The dynamic constant.- Returns:
- The returned value.
-
-