Enum AnnotationValue.RenderingDispatcher
- java.lang.Object
-
- java.lang.Enum<AnnotationValue.RenderingDispatcher>
-
- net.bytebuddy.description.annotation.AnnotationValue.RenderingDispatcher
-
- All Implemented Interfaces:
Serializable
,Comparable<AnnotationValue.RenderingDispatcher>
- Enclosing interface:
- AnnotationValue<T,S>
public static enum AnnotationValue.RenderingDispatcher extends Enum<AnnotationValue.RenderingDispatcher>
A rendering dispatcher is responsible for resolving annotation values toString
representations.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description JAVA_14_CAPABLE_VM
A rendering dispatcher for Java 14 onward.JAVA_9_CAPABLE_VM
A rendering dispatcher for Java 9 onward.LEGACY_VM
A rendering dispatcher for any VM previous to Java 9.
-
Field Summary
Fields Modifier and Type Field Description static AnnotationValue.RenderingDispatcher
CURRENT
The rendering dispatcher for the current VM.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
toComponentTag(TypeDescription typeDescription)
Resolves the supplied type description's component tag.String
toSourceString(boolean value)
Represents the suppliedboolean
value as aString
.String
toSourceString(byte value)
Represents the suppliedboolean
value as aString
.abstract String
toSourceString(char value)
Represents the suppliedchar
value as aString
.abstract String
toSourceString(double value)
Represents the supplieddouble
value as aString
.abstract String
toSourceString(float value)
Represents the suppliedfloat
value as aString
.String
toSourceString(int value)
Represents the suppliedint
value as aString
.abstract String
toSourceString(long value)
Represents the suppliedlong
value as aString
.String
toSourceString(short value)
Represents the suppliedshort
value as aString
.abstract String
toSourceString(String value)
String
toSourceString(List<?> values)
Represents the supplied list elements as aString
.abstract String
toSourceString(TypeDescription value)
Represents the suppliedTypeDescription
value as aString
.static AnnotationValue.RenderingDispatcher
valueOf(String name)
Returns the enum constant of this type with the specified name.static AnnotationValue.RenderingDispatcher[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LEGACY_VM
public static final AnnotationValue.RenderingDispatcher LEGACY_VM
A rendering dispatcher for any VM previous to Java 9.
-
JAVA_9_CAPABLE_VM
public static final AnnotationValue.RenderingDispatcher JAVA_9_CAPABLE_VM
A rendering dispatcher for Java 9 onward.
-
JAVA_14_CAPABLE_VM
public static final AnnotationValue.RenderingDispatcher JAVA_14_CAPABLE_VM
A rendering dispatcher for Java 14 onward.
-
-
Field Detail
-
CURRENT
public static final AnnotationValue.RenderingDispatcher CURRENT
The rendering dispatcher for the current VM.
-
-
Method Detail
-
values
public static AnnotationValue.RenderingDispatcher[] 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 (AnnotationValue.RenderingDispatcher c : AnnotationValue.RenderingDispatcher.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AnnotationValue.RenderingDispatcher valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toSourceString
public String toSourceString(boolean value)
Represents the suppliedboolean
value as aString
.- Parameters:
value
- Theboolean
value to render.- Returns:
- An appropriate
String
representation.
-
toSourceString
public String toSourceString(byte value)
Represents the suppliedboolean
value as aString
.- Parameters:
value
- Theboolean
value to render.- Returns:
- An appropriate
String
representation.
-
toSourceString
public String toSourceString(short value)
Represents the suppliedshort
value as aString
.- Parameters:
value
- Theshort
value to render.- Returns:
- An appropriate
String
representation.
-
toSourceString
public abstract String toSourceString(char value)
Represents the suppliedchar
value as aString
.- Parameters:
value
- Thechar
value to render.- Returns:
- An appropriate
String
representation.
-
toSourceString
public String toSourceString(int value)
Represents the suppliedint
value as aString
.- Parameters:
value
- Theint
value to render.- Returns:
- An appropriate
String
representation.
-
toSourceString
public abstract String toSourceString(long value)
Represents the suppliedlong
value as aString
.- Parameters:
value
- Thelong
value to render.- Returns:
- An appropriate
String
representation.
-
toSourceString
public abstract String toSourceString(float value)
Represents the suppliedfloat
value as aString
.- Parameters:
value
- Thefloat
value to render.- Returns:
- An appropriate
String
representation.
-
toSourceString
public abstract String toSourceString(double value)
Represents the supplieddouble
value as aString
.- Parameters:
value
- Thedouble
value to render.- Returns:
- An appropriate
String
representation.
-
toSourceString
public abstract String toSourceString(TypeDescription value)
Represents the suppliedTypeDescription
value as aString
.- Parameters:
value
- TheTypeDescription
value to render.- Returns:
- An appropriate
String
representation.
-
toSourceString
public String toSourceString(List<?> values)
Represents the supplied list elements as aString
.- Parameters:
values
- The elements to render where each element is represented by itsObject.toString()
representation.- Returns:
- An appropriate
String
representation.
-
toComponentTag
public int toComponentTag(TypeDescription typeDescription)
Resolves the supplied type description's component tag.- Parameters:
typeDescription
- The type to resolve.- Returns:
- The character that describes the component tag as an
int
to ease concatenation.
-
-