Enum Class AnnotationValue.RenderingDispatcher

java.lang.Object
java.lang.Enum<AnnotationValue.RenderingDispatcher>
net.bytebuddy.description.annotation.AnnotationValue.RenderingDispatcher
All Implemented Interfaces:
Serializable, Comparable<AnnotationValue.RenderingDispatcher>, 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.
  • Enum Constant Details

  • Field Details

    • ARRAY_PREFIX

      private static final String ARRAY_PREFIX
      The prefix text for describing a mistyped array property.
      See Also:
    • CURRENT

      public static final AnnotationValue.RenderingDispatcher CURRENT
      The rendering dispatcher for the current VM.
    • openingBrace

      private final char openingBrace
      The opening brace of an array String representation.
    • closingBrace

      private final char closingBrace
      The closing brace of an array String representation.
    • componentAsInteger

      private final boolean componentAsInteger
      If true, 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.
      Parameters:
      openingBrace - The opening brace of an array String representation.
      closingBrace - The closing brace of an array String representation.
      componentAsInteger - If true, annotation types are represented as characters rather then integer values.
  • Method Details

    • values

      public static AnnotationValue.RenderingDispatcher[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AnnotationValue.RenderingDispatcher valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • toSourceString

      public String toSourceString(boolean value)
      Represents the supplied boolean value as a String.
      Parameters:
      value - The boolean value to render.
      Returns:
      An appropriate String representation.
    • toSourceString

      public String toSourceString(byte value)
      Represents the supplied boolean value as a String.
      Parameters:
      value - The boolean value to render.
      Returns:
      An appropriate String representation.
    • toSourceString

      public String toSourceString(short value)
      Represents the supplied short value as a String.
      Parameters:
      value - The short value to render.
      Returns:
      An appropriate String representation.
    • toSourceString

      public abstract String toSourceString(char value)
      Represents the supplied char value as a String.
      Parameters:
      value - The char value to render.
      Returns:
      An appropriate String representation.
    • toSourceString

      public String toSourceString(int value)
      Represents the supplied int value as a String.
      Parameters:
      value - The int value to render.
      Returns:
      An appropriate String representation.
    • toSourceString

      public abstract String toSourceString(long value)
      Represents the supplied long value as a String.
      Parameters:
      value - The long value to render.
      Returns:
      An appropriate String representation.
    • toSourceString

      public abstract String toSourceString(float value)
      Represents the supplied float value as a String.
      Parameters:
      value - The float value to render.
      Returns:
      An appropriate String representation.
    • toSourceString

      public abstract String toSourceString(double value)
      Represents the supplied double value as a String.
      Parameters:
      value - The double value to render.
      Returns:
      An appropriate String representation.
    • toSourceString

      public abstract String toSourceString(String value)
      Represents the supplied String value as a String.
      Parameters:
      value - The String value to render.
      Returns:
      An appropriate String representation.
    • toSourceString

      public abstract String toSourceString(TypeDescription value)
      Represents the supplied TypeDescription value as a String.
      Parameters:
      value - The TypeDescription value to render.
      Returns:
      An appropriate String representation.
    • toSourceString

      public String toSourceString(List<?> values)
      Represents the supplied list elements as a String.
      Parameters:
      values - The elements to render where each element is represented by its Object.toString() representation.
      Returns:
      An appropriate String representation.
    • toArrayErrorString

      public String toArrayErrorString(AnnotationValue.Sort sort)
      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

      public String toTypeErrorString(Class<?> type)
      Resolves a type to be represented in an error message for a mismatched type.
      Parameters:
      type - The represented type.
      Returns:
      The name to represent.