Package net.bytebuddy.description.type
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 java.lang.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 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
-
-
Field Summary
Fields Modifier and Type Field Description private TypeDescriptiondeclaringTypeThe generic type's declaring type.private java.util.List<? extends TypeVariableToken>typeVariableTokensAny type variables that are directly declared by the member that declares the type being reduced.
-
Constructor Summary
Constructors Constructor Description Reducing(TypeDescription declaringType, java.util.List<? extends TypeVariableToken> typeVariableTokens)Creates a new reducing type visitor.Reducing(TypeDescription declaringType, TypeVariableToken... typeVariableToken)Creates a new reducing type visitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeDescriptiononGenericArray(TypeDescription.Generic genericArray)Visits a generic array type (TypeDefinition.Sort.GENERIC_ARRAY).TypeDescriptiononNonGenericType(TypeDescription.Generic typeDescription)Visits a non-generic type (TypeDefinition.Sort.NON_GENERIC).TypeDescriptiononParameterizedType(TypeDescription.Generic parameterizedType)Visits a parameterized type (TypeDefinition.Sort.PARAMETERIZED).TypeDescriptiononTypeVariable(TypeDescription.Generic typeVariable)Visits a type variable (TypeDefinition.Sort.VARIABLE,TypeDefinition.Sort.VARIABLE_SYMBOLIC).TypeDescriptiononWildcard(TypeDescription.Generic wildcard)Visits a wildcard (TypeDefinition.Sort.WILDCARD).
-
-
-
Field Detail
-
declaringType
private final TypeDescription declaringType
The generic type's declaring type.
-
typeVariableTokens
private final java.util.List<? extends TypeVariableToken> typeVariableTokens
Any type variables that are directly declared by the member that declares the type being reduced.
-
-
Constructor Detail
-
Reducing
public Reducing(TypeDescription declaringType, TypeVariableToken... typeVariableToken)
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, java.util.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 Detail
-
onGenericArray
public TypeDescription onGenericArray(TypeDescription.Generic genericArray)
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
public TypeDescription onWildcard(TypeDescription.Generic wildcard)
Visits a wildcard (TypeDefinition.Sort.WILDCARD).- Specified by:
onWildcardin interfaceTypeDescription.Generic.Visitor<TypeDescription>- Parameters:
wildcard- The wildcard.- Returns:
- The visitor's return value.
-
onParameterizedType
public TypeDescription onParameterizedType(TypeDescription.Generic parameterizedType)
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
public TypeDescription onTypeVariable(TypeDescription.Generic typeVariable)
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
public TypeDescription onNonGenericType(TypeDescription.Generic typeDescription)
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.
-
-