Enum TypeParameterNaming.TypeParameterNamingClassification
- java.lang.Object
-
- java.lang.Enum<TypeParameterNaming.TypeParameterNamingClassification>
-
- com.google.errorprone.bugpatterns.TypeParameterNaming.TypeParameterNamingClassification
-
- All Implemented Interfaces:
Serializable
,Comparable<TypeParameterNaming.TypeParameterNamingClassification>
- Enclosing class:
- TypeParameterNaming
public static enum TypeParameterNaming.TypeParameterNamingClassification extends Enum<TypeParameterNaming.TypeParameterNamingClassification>
An enum that classifies a String name into different types, based on the Google Java Style Guide's rules for Type Parameters.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLASS_NAME_WITH_T
A valid Type Parameter name, that follows the style guide rule:LETTER_WITH_MAYBE_NUMERAL
Examples: B, Q, R2, T1, A9NON_CLASS_NAME_WITH_T_SUFFIX
Names of the form which are not camel case, but nonetheless have a Capital T at the end and this shouldn't suggest to add more.UNCLASSIFIED
Anything else.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TypeParameterNaming.TypeParameterNamingClassification
classify(String name)
boolean
isValidName()
static TypeParameterNaming.TypeParameterNamingClassification
valueOf(String name)
Returns the enum constant of this type with the specified name.static TypeParameterNaming.TypeParameterNamingClassification[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LETTER_WITH_MAYBE_NUMERAL
public static final TypeParameterNaming.TypeParameterNamingClassification LETTER_WITH_MAYBE_NUMERAL
Examples: B, Q, R2, T1, A9
-
CLASS_NAME_WITH_T
public static final TypeParameterNaming.TypeParameterNamingClassification CLASS_NAME_WITH_T
A valid Type Parameter name, that follows the style guide rule:Examples: DataTypeT, FooT, BarT
-
NON_CLASS_NAME_WITH_T_SUFFIX
public static final TypeParameterNaming.TypeParameterNamingClassification NON_CLASS_NAME_WITH_T_SUFFIX
Names of the form which are not camel case, but nonetheless have a Capital T at the end and this shouldn't suggest to add more.Examples; IDataT, CConverterT. BART, FOOT
-
UNCLASSIFIED
public static final TypeParameterNaming.TypeParameterNamingClassification UNCLASSIFIED
Anything else.
-
-
Method Detail
-
values
public static TypeParameterNaming.TypeParameterNamingClassification[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TypeParameterNaming.TypeParameterNamingClassification c : TypeParameterNaming.TypeParameterNamingClassification.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeParameterNaming.TypeParameterNamingClassification valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
classify
public static TypeParameterNaming.TypeParameterNamingClassification classify(String name)
-
isValidName
public boolean isValidName()
-
-