Enum TypeParameterNaming.TypeParameterNamingClassification
java.lang.Object
java.lang.Enum<TypeParameterNaming.TypeParameterNamingClassification>
com.google.errorprone.bugpatterns.TypeParameterNaming.TypeParameterNamingClassification
- All Implemented Interfaces:
Serializable
,Comparable<TypeParameterNaming.TypeParameterNamingClassification>
,java.lang.constant.Constable
- 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.
- Author:
- siyuanl@google.com (Siyuan Liu), glorioso@google.com (Nick Glorioso)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA valid Type Parameter name, that follows the style guide rule:Examples: B, Q, R2, T1, A9Names 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.Anything else. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the enum constant of this type with the specified name.values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
LETTER_WITH_MAYBE_NUMERAL
Examples: B, Q, R2, T1, A9 -
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_SUFFIXNames 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
Anything else.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
isValidName
public boolean isValidName()
-