Package io.micronaut.core.type
Enum Class TypeInformation.TypeFormat
- All Implemented Interfaces:
Serializable
,Comparable<TypeInformation.TypeFormat>
,Constable
- Enclosing interface:
- TypeInformation<T>
Type formatting to apply.
- Since:
- 4.8.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionQualified name highlighted with ANSI.Shortened name highlighted with ANSI.Simple name highlighted wit ANSI.Qualified format.Shorted format.Simple format. -
Method Summary
Modifier and TypeMethodDescriptionformatAnnotation
(String annotationRef) Format the annotation name.getBeanTypeString
(@NonNull TypeInformation.TypeFormat format, @NonNull Class<?> type, @NonNull Map<String, Argument<?>> generics, @NonNull AnnotationMetadata annotationMetadata) Get a type string for the given format.getBeanTypeString
(TypeInformation.TypeFormat typeFormat, @NonNull Argument<?> argument) Obtain the bean type string.getTypeString
(@NonNull TypeInformation.TypeFormat format, @NonNull Class<?> type, @NonNull Map<String, Argument<?>> generics) Get a type string for the given format.boolean
isAnsi()
static TypeInformation.TypeFormat
Returns the enum constant of this class with the specified name.static TypeInformation.TypeFormat[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SIMPLE
Simple format. -
QUALIFIED
Qualified format. -
SHORTENED
Shorted format. -
ANSI_SIMPLE
Simple name highlighted wit ANSI. -
ANSI_QUALIFIED
Qualified name highlighted with ANSI. -
ANSI_SHORTENED
Shortened name highlighted with ANSI.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getBeanTypeString
@NonNull public static @NonNull String getBeanTypeString(@NonNull TypeInformation.TypeFormat typeFormat, @NonNull @NonNull Argument<?> argument) Obtain the bean type string.- Parameters:
typeFormat
- The type formatargument
- The argument- Returns:
- The string
-
isAnsi
public boolean isAnsi()- Returns:
- Is an ANSI format.
-
formatAnnotation
Format the annotation name.- Parameters:
annotationRef
- The type name- Returns:
- The annotation
-
getTypeString
@NonNull public static @NonNull String getTypeString(@NonNull @NonNull TypeInformation.TypeFormat format, @NonNull @NonNull Class<?> type, @NonNull @NonNull Map<String, Argument<?>> generics) Get a type string for the given format.- Parameters:
format
- The formattype
- The typegenerics
- The generics- Returns:
- the type string
-
getBeanTypeString
@NonNull public static @NonNull String getBeanTypeString(@NonNull @NonNull TypeInformation.TypeFormat format, @NonNull @NonNull Class<?> type, @NonNull @NonNull Map<String, Argument<?>> generics, @NonNull @NonNull AnnotationMetadata annotationMetadata) Get a type string for the given format.- Parameters:
format
- The formattype
- The typegenerics
- The genericsannotationMetadata
- The annotation metadata- Returns:
- the type string
-