public enum TypeDisplayNameFormat extends Enum<TypeDisplayNameFormat>
| Enum Constant and Description |
|---|
CANONICAL_NAME |
FULL_NAME |
NONE |
SIMPLE_NAME |
TYPE_NAME |
| Modifier and Type | Method and Description |
|---|---|
String |
getName(Class<?> type)
Returns the name of the given type based on the specified TypeDisplayNameFormat.
|
String |
getName(Field field)
Returns the name of the given field's type.
|
String |
getName(Method method)
Returns the name of the given method's return type based on the specified TypeDisplayNameFormat.
|
String |
getName(Parameter parameter)
Returns the name of the given parameter's type based on the specified TypeDisplayNameFormat.
|
static TypeDisplayNameFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TypeDisplayNameFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TypeDisplayNameFormat FULL_NAME
public static final TypeDisplayNameFormat CANONICAL_NAME
public static final TypeDisplayNameFormat TYPE_NAME
public static final TypeDisplayNameFormat SIMPLE_NAME
public static final TypeDisplayNameFormat NONE
public static TypeDisplayNameFormat[] values()
for (TypeDisplayNameFormat c : TypeDisplayNameFormat.values()) System.out.println(c);
public static TypeDisplayNameFormat valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getName(Class<?> type)
type - The type for which the name will be returnedpublic String getName(Method method)
method - The Method object for which the return type name will be returnedpublic String getName(Field field)
field - The field for which the type name will be returnedCopyright © 2024. All rights reserved.