Enum TypeDescription.Generic.Visitor.Validator
java.lang.Object
java.lang.Enum<TypeDescription.Generic.Visitor.Validator>
net.bytebuddy.description.type.TypeDescription.Generic.Visitor.Validator
- All Implemented Interfaces:
Serializable, Comparable<TypeDescription.Generic.Visitor.Validator>, java.lang.constant.Constable, TypeDescription.Generic.Visitor<Boolean>
- Enclosing interface:
TypeDescription.Generic.Visitor<T>
public static enum TypeDescription.Generic.Visitor.Validator
extends Enum<TypeDescription.Generic.Visitor.Validator>
implements TypeDescription.Generic.Visitor<Boolean>
A validator for Java types that are defined for a specified type use within a Java class file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumA type validator for checking type annotations.Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface 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 ConstantsEnum ConstantDescriptionA validator for a method exception type.A validator for a field type.A validator for an interface type.A validator for a method parameter type.A validator for a method return type.A validator for a method receiver type.A validator for checking a type's non-null super class.A validator for a type variable. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleantrueif this validator accepts array types.private final booleantrueif this validator accepts primitive types.private final booleantrueif this validator accepts type variables.private final booleantrueif this validator accepts thevoidtype. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateValidator(boolean acceptsArray, boolean acceptsPrimitive, boolean acceptsVariable, boolean acceptsVoid) Creates a new validator. -
Method Summary
Modifier and TypeMethodDescriptiononGenericArray(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
-
SUPER_CLASS
A validator for checking a type's non-null super class. -
INTERFACE
A validator for an interface type. -
TYPE_VARIABLE
A validator for a type variable. -
FIELD
A validator for a field type. -
METHOD_RETURN
A validator for a method return type. -
METHOD_PARAMETER
A validator for a method parameter type. -
EXCEPTION
A validator for a method exception type. -
RECEIVER
A validator for a method receiver type.
-
-
Field Details
-
acceptsArray
private final boolean acceptsArraytrueif this validator accepts array types. -
acceptsPrimitive
private final boolean acceptsPrimitivetrueif this validator accepts primitive types. -
acceptsVariable
private final boolean acceptsVariabletrueif this validator accepts type variables. -
acceptsVoid
private final boolean acceptsVoidtrueif this validator accepts thevoidtype.
-
-
Constructor Details
-
Validator
private Validator(boolean acceptsArray, boolean acceptsPrimitive, boolean acceptsVariable, boolean acceptsVoid) Creates a new validator.- Parameters:
acceptsArray-trueif this validator accepts array types.acceptsPrimitive-trueif this validator accepts primitive types.acceptsVariable-trueif this validator accepts type variables.acceptsVoid-trueif this validator accepts thevoidtype.
-
-
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
-
onGenericArray
Visits a generic array type (TypeDefinition.Sort.GENERIC_ARRAY).- Specified by:
onGenericArrayin 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:
onWildcardin interfaceTypeDescription.Generic.Visitor<Boolean>- Parameters:
wildcard- The wildcard.- Returns:
- The visitor's return value.
-
onParameterizedType
Visits a parameterized type (TypeDefinition.Sort.PARAMETERIZED).- Specified by:
onParameterizedTypein 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:
onTypeVariablein 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:
onNonGenericTypein interfaceTypeDescription.Generic.Visitor<Boolean>- Parameters:
typeDescription- The non-generic type.- Returns:
- The visitor's return value.
-