Enum Class TypeInformation.TypeFormat

java.lang.Object
java.lang.Enum<TypeInformation.TypeFormat>
io.micronaut.core.type.TypeInformation.TypeFormat
All Implemented Interfaces:
Serializable, Comparable<TypeInformation.TypeFormat>, Constable
Enclosing interface:
TypeInformation<T>

public static enum TypeInformation.TypeFormat extends Enum<TypeInformation.TypeFormat>
Type formatting to apply.
Since:
4.8.0
Author:
graemerocher
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static TypeInformation.TypeFormat[] 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 TypeInformation.TypeFormat 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
    • getBeanTypeString

      public static String getBeanTypeString(TypeInformation.TypeFormat typeFormat, Argument<?> argument)
      Obtain the bean type string.
      Parameters:
      typeFormat - The type format
      argument - The argument
      Returns:
      The string
    • isAnsi

      public boolean isAnsi()
      Returns:
      Is an ANSI format.
    • formatAnnotation

      public String formatAnnotation(String annotationRef)
      Format the annotation name.
      Parameters:
      annotationRef - The type name
      Returns:
      The annotation
    • getTypeString

      public static String getTypeString(TypeInformation.TypeFormat format, Class<?> type, Map<String, Argument<?>> generics)
      Get a type string for the given format.
      Parameters:
      format - The format
      type - The type
      generics - The generics
      Returns:
      the type string
    • getBeanTypeString

      public static String getBeanTypeString(TypeInformation.TypeFormat format, Class<?> type, Map<String, Argument<?>> generics, AnnotationMetadata annotationMetadata)
      Get a type string for the given format.
      Parameters:
      format - The format
      type - The type
      generics - The generics
      annotationMetadata - The annotation metadata
      Returns:
      the type string