Enum AnnotationValue.RenderingDispatcher
java.lang.Object
java.lang.Enum<AnnotationValue.RenderingDispatcher>
net.bytebuddy.description.annotation.AnnotationValue.RenderingDispatcher
- All Implemented Interfaces:
Serializable, Comparable<AnnotationValue.RenderingDispatcher>, java.lang.constant.Constable
- Enclosing interface:
AnnotationValue<T,S>
public static enum AnnotationValue.RenderingDispatcher
extends Enum<AnnotationValue.RenderingDispatcher>
A rendering dispatcher is responsible for resolving annotation values to
String representations.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA rendering dispatcher for Java 14 onward.A rendering dispatcher for Java 17 onward.A rendering dispatcher for Java 19 onward.A rendering dispatcher for Java 9 onward.A rendering dispatcher for any VM previous to Java 9. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringThe prefix text for describing a mistyped array property.private final charThe closing brace of an arrayStringrepresentation.private final booleanIftrue, annotation types are represented as integer rather then character value.static final AnnotationValue.RenderingDispatcherThe rendering dispatcher for the current VM.private final charThe opening brace of an arrayStringrepresentation. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRenderingDispatcher(char openingBrace, char closingBrace, boolean componentAsInteger) Creates a new rendering dispatcher. -
Method Summary
Modifier and TypeMethodDescriptionResolves a string for representing an inconsistently typed array of an annotation property.toSourceString(boolean value) Represents the suppliedbooleanvalue as aString.toSourceString(byte value) Represents the suppliedbooleanvalue as aString.abstract StringtoSourceString(char value) Represents the suppliedcharvalue as aString.abstract StringtoSourceString(double value) Represents the supplieddoublevalue as aString.abstract StringtoSourceString(float value) Represents the suppliedfloatvalue as aString.toSourceString(int value) Represents the suppliedintvalue as aString.abstract StringtoSourceString(long value) Represents the suppliedlongvalue as aString.toSourceString(short value) Represents the suppliedshortvalue as aString.abstract StringtoSourceString(String value) toSourceString(List<?> values) Represents the supplied list elements as aString.abstract StringtoSourceString(TypeDescription value) Represents the suppliedTypeDescriptionvalue as aString.toTypeErrorString(Class<?> type) Resolves a type to be represented in an error message for a mismatched type.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 Details
-
LEGACY_VM
A rendering dispatcher for any VM previous to Java 9. -
JAVA_9_CAPABLE_VM
A rendering dispatcher for Java 9 onward. -
JAVA_14_CAPABLE_VM
A rendering dispatcher for Java 14 onward. -
JAVA_17_CAPABLE_VM
A rendering dispatcher for Java 17 onward. -
JAVA_19_CAPABLE_VM
A rendering dispatcher for Java 19 onward.
-
-
Field Details
-
ARRAY_PREFIX
The prefix text for describing a mistyped array property.- See Also:
-
CURRENT
The rendering dispatcher for the current VM. -
openingBrace
private final char openingBraceThe opening brace of an arrayStringrepresentation. -
closingBrace
private final char closingBraceThe closing brace of an arrayStringrepresentation. -
componentAsInteger
private final boolean componentAsIntegerIftrue, annotation types are represented as integer rather then character value.
-
-
Constructor Details
-
RenderingDispatcher
private RenderingDispatcher(char openingBrace, char closingBrace, boolean componentAsInteger) Creates a new rendering dispatcher.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
toSourceString
-
toSourceString
-
toSourceString
-
toSourceString
-
toSourceString
-
toSourceString
-
toSourceString
-
toSourceString
-
toSourceString
Represents the suppliedTypeDescriptionvalue as aString.- Parameters:
value- TheTypeDescriptionvalue to render.- Returns:
- An appropriate
Stringrepresentation.
-
toSourceString
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
Stringrepresentation.
-
toArrayErrorString
Resolves a string for representing an inconsistently typed array of an annotation property.- Parameters:
sort- The sort of the inconsistent property.- Returns:
- A message to describe the component property.
-
toTypeErrorString
-