Package net.bytebuddy.description.type
Enum TypeDescription.Generic.Visitor.Validator.ForTypeAnnotations
java.lang.Object
java.lang.Enum<TypeDescription.Generic.Visitor.Validator.ForTypeAnnotations>
net.bytebuddy.description.type.TypeDescription.Generic.Visitor.Validator.ForTypeAnnotations
- All Implemented Interfaces:
Serializable
,Comparable<TypeDescription.Generic.Visitor.Validator.ForTypeAnnotations>
,java.lang.constant.Constable
,TypeDescription.Generic.Visitor<Boolean>
- Enclosing class:
TypeDescription.Generic.Visitor.Validator
public static enum TypeDescription.Generic.Visitor.Validator.ForTypeAnnotations
extends Enum<TypeDescription.Generic.Visitor.Validator.ForTypeAnnotations>
implements TypeDescription.Generic.Visitor<Boolean>
A type validator for checking type annotations.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.description.type.TypeDescription.Generic.Visitor
TypeDescription.Generic.Visitor.AnnotationStripper, TypeDescription.Generic.Visitor.Assigner, TypeDescription.Generic.Visitor.ForRawType, TypeDescription.Generic.Visitor.ForSignatureVisitor, TypeDescription.Generic.Visitor.Generalizing, TypeDescription.Generic.Visitor.NoOp, TypeDescription.Generic.Visitor.Reducing, TypeDescription.Generic.Visitor.Reifying, TypeDescription.Generic.Visitor.Substitutor, TypeDescription.Generic.Visitor.TypeErasing, TypeDescription.Generic.Visitor.Validator
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
isValid
(TypeDescription.Generic typeDescription) Checks if the supplied type's type annotations are valid.static boolean
ofFormalTypeVariable
(TypeDescription.Generic typeVariable) Validates the type annotations on a formal type variable but not on its bounds..onGenericArray
(TypeDescription.Generic genericArray) Visits a generic array type (TypeDefinition.Sort.GENERIC_ARRAY
).onNonGenericType
(TypeDescription.Generic typeDescription) Visits a non-generic type (TypeDefinition.Sort.NON_GENERIC
).onParameterizedType
(TypeDescription.Generic parameterizedType) Visits a parameterized type (TypeDefinition.Sort.PARAMETERIZED
).onTypeVariable
(TypeDescription.Generic typeVariable) Visits a type variable (TypeDefinition.Sort.VARIABLE
,TypeDefinition.Sort.VARIABLE_SYMBOLIC
).onWildcard
(TypeDescription.Generic wildcard) Visits a wildcard (TypeDefinition.Sort.WILDCARD
).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
-
INSTANCE
The singleton instance.
-
-
Field Details
-
TYPE_USE
The name of theElementType#TYPE_USE
element.- See Also:
-
TYPE_PARAMETER
The name of theElementType#TYPE_PARAMETER
element.- See Also:
-
-
Constructor Details
-
ForTypeAnnotations
private ForTypeAnnotations()
-
-
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
-
ofFormalTypeVariable
Validates the type annotations on a formal type variable but not on its bounds..- Parameters:
typeVariable
- The type variable to validate.- Returns:
true
if the formal type variable declares invalid type annotations.
-
onGenericArray
Visits a generic array type (TypeDefinition.Sort.GENERIC_ARRAY
).- Specified by:
onGenericArray
in interfaceTypeDescription.Generic.Visitor<Boolean>
- Parameters:
genericArray
- The generic array type.- Returns:
- The visitor's return value.
-
onWildcard
Visits a wildcard (TypeDefinition.Sort.WILDCARD
).- Specified by:
onWildcard
in interfaceTypeDescription.Generic.Visitor<Boolean>
- Parameters:
wildcard
- The wildcard.- Returns:
- The visitor's return value.
-
onParameterizedType
Visits a parameterized type (TypeDefinition.Sort.PARAMETERIZED
).- Specified by:
onParameterizedType
in interfaceTypeDescription.Generic.Visitor<Boolean>
- Parameters:
parameterizedType
- The generic array type.- Returns:
- The visitor's return value.
-
onTypeVariable
Visits a type variable (TypeDefinition.Sort.VARIABLE
,TypeDefinition.Sort.VARIABLE_SYMBOLIC
).- Specified by:
onTypeVariable
in interfaceTypeDescription.Generic.Visitor<Boolean>
- Parameters:
typeVariable
- The generic array type.- Returns:
- The visitor's return value.
-
onNonGenericType
Visits a non-generic type (TypeDefinition.Sort.NON_GENERIC
).- Specified by:
onNonGenericType
in interfaceTypeDescription.Generic.Visitor<Boolean>
- Parameters:
typeDescription
- The non-generic type.- Returns:
- The visitor's return value.
-
isValid
Checks if the supplied type's type annotations are valid.- Parameters:
typeDescription
- The type to validate.- Returns:
true
if the supplied type's type annotations are valid.
-