public enum TypeConvention extends Enum<TypeConvention>
Common conventions for types
.Enum Constant and Description |
---|
CONTROLLER |
FACTORY |
JOB |
REPOSITORY |
SERVICE |
Modifier and Type | Method and Description |
---|---|
String |
asHyphenatedName(Class type)
Returns the hyphenated equivalent for this convention for the given class.
|
String |
asPropertyName(Class type)
Returns the property name equivalent for this convention for the given class.
|
static TypeConvention |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TypeConvention[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TypeConvention CONTROLLER
public static final TypeConvention SERVICE
public static final TypeConvention REPOSITORY
public static final TypeConvention JOB
public static final TypeConvention FACTORY
public static TypeConvention[] values()
for (TypeConvention c : TypeConvention.values()) System.out.println(c);
public static TypeConvention 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 asPropertyName(Class type)
Returns the property name equivalent for this convention for the given class. Eg. BookController -> book
type
- The type