Package net.bytebuddy.utility
Enum JavaConstant.Visitor.NoOp
- java.lang.Object
-
- java.lang.Enum<JavaConstant.Visitor.NoOp>
-
- net.bytebuddy.utility.JavaConstant.Visitor.NoOp
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<JavaConstant.Visitor.NoOp>
,JavaConstant.Visitor<JavaConstant>
- Enclosing interface:
- JavaConstant.Visitor<T>
public static enum JavaConstant.Visitor.NoOp extends java.lang.Enum<JavaConstant.Visitor.NoOp> implements JavaConstant.Visitor<JavaConstant>
A non-operational implementation of aJavaConstant.Visitor
for aJavaConstant
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.utility.JavaConstant.Visitor
JavaConstant.Visitor.NoOp
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
NoOp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaConstant
onDynamic(JavaConstant.Dynamic constant)
Invoked on aJavaConstant.Dynamic
constant.JavaConstant
onMethodHandle(JavaConstant.MethodHandle constant)
Invoked on a constant that represents aJavaConstant.MethodHandle
.JavaConstant
onMethodType(JavaConstant.MethodType constant)
Invoked on a constant that represents aJavaConstant.MethodType
.JavaConstant
onType(JavaConstant.Simple<TypeDescription> constant)
Invoked on aJavaConstant.Simple
constant that represents aTypeDescription
.JavaConstant
onValue(JavaConstant.Simple<?> constant)
Invoked on aJavaConstant.Simple
constant that represents itself.static JavaConstant.Visitor.NoOp
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static JavaConstant.Visitor.NoOp[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final JavaConstant.Visitor.NoOp INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static JavaConstant.Visitor.NoOp[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JavaConstant.Visitor.NoOp c : JavaConstant.Visitor.NoOp.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JavaConstant.Visitor.NoOp valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
onValue
public JavaConstant onValue(JavaConstant.Simple<?> constant)
Invoked on aJavaConstant.Simple
constant that represents itself. Such values are of typeInteger
,Long
,Float
,Double
orString
.- Specified by:
onValue
in interfaceJavaConstant.Visitor<JavaConstant>
- Parameters:
constant
- The simple constant.- Returns:
- The returned value.
-
onType
public JavaConstant onType(JavaConstant.Simple<TypeDescription> constant)
Invoked on aJavaConstant.Simple
constant that represents aTypeDescription
.- Specified by:
onType
in interfaceJavaConstant.Visitor<JavaConstant>
- Parameters:
constant
- The simple constant.- Returns:
- The returned value.
-
onMethodType
public JavaConstant onMethodType(JavaConstant.MethodType constant)
Invoked on a constant that represents aJavaConstant.MethodType
.- Specified by:
onMethodType
in interfaceJavaConstant.Visitor<JavaConstant>
- Parameters:
constant
- The method type constant.- Returns:
- The returned value.
-
onMethodHandle
public JavaConstant onMethodHandle(JavaConstant.MethodHandle constant)
Invoked on a constant that represents aJavaConstant.MethodHandle
.- Specified by:
onMethodHandle
in interfaceJavaConstant.Visitor<JavaConstant>
- Parameters:
constant
- The method handle constant.- Returns:
- The returned value.
-
onDynamic
public JavaConstant onDynamic(JavaConstant.Dynamic constant)
Invoked on aJavaConstant.Dynamic
constant.- Specified by:
onDynamic
in interfaceJavaConstant.Visitor<JavaConstant>
- Parameters:
constant
- The dynamic constant.- Returns:
- The returned value.
-
-