Class TypeDescription.Generic.Visitor.Reducing
java.lang.Object
net.bytebuddy.description.type.TypeDescription.Generic.Visitor.Reducing
- All Implemented Interfaces:
TypeDescription.Generic.Visitor<TypeDescription>
- Enclosing interface:
TypeDescription.Generic.Visitor<T>
@Enhance
public static class TypeDescription.Generic.Visitor.Reducing
extends Object
implements TypeDescription.Generic.Visitor<TypeDescription>
A visitor that reduces a detached generic type to its erasure.
-
Nested Class Summary
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 -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeDescriptionThe generic type's declaring type.private final List<? extends TypeVariableToken> Any type variables that are directly declared by the member that declares the type being reduced. -
Constructor Summary
ConstructorsConstructorDescriptionReducing(TypeDescription declaringType, List<? extends TypeVariableToken> typeVariableTokens) Creates a new reducing type visitor.Reducing(TypeDescription declaringType, TypeVariableToken... typeVariableToken) Creates a new reducing type visitor. -
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).
-
Field Details
-
declaringType
The generic type's declaring type. -
typeVariableTokens
Any type variables that are directly declared by the member that declares the type being reduced.
-
-
Constructor Details
-
Reducing
Creates a new reducing type visitor.- Parameters:
declaringType- The generic type's declaring type.typeVariableToken- Any type variables that are directly declared by the member that declares the type being reduced.
-
Reducing
public Reducing(TypeDescription declaringType, List<? extends TypeVariableToken> typeVariableTokens) Creates a new reducing type visitor.- Parameters:
declaringType- The generic type's declaring type.typeVariableTokens- Any type variables that are directly declared by the member that declares the type being reduced.
-
-
Method Details
-
onGenericArray
Visits a generic array type (TypeDefinition.Sort.GENERIC_ARRAY).- Specified by:
onGenericArrayin interfaceTypeDescription.Generic.Visitor<TypeDescription>- 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<TypeDescription>- Parameters:
wildcard- The wildcard.- Returns:
- The visitor's return value.
-
onParameterizedType
Visits a parameterized type (TypeDefinition.Sort.PARAMETERIZED).- Specified by:
onParameterizedTypein interfaceTypeDescription.Generic.Visitor<TypeDescription>- 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<TypeDescription>- 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<TypeDescription>- Parameters:
typeDescription- The non-generic type.- Returns:
- The visitor's return value.
-