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.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 TypeDescription
declaringType
The generic type's declaring type.private java.util.List<? extends TypeVariableToken>
typeVariableTokens
Any 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 TypeDescription
onGenericArray(TypeDescription.Generic genericArray)
Visits a generic array type (TypeDefinition.Sort.GENERIC_ARRAY
).TypeDescription
onNonGenericType(TypeDescription.Generic typeDescription)
Visits a non-generic type (TypeDefinition.Sort.NON_GENERIC
).TypeDescription
onParameterizedType(TypeDescription.Generic parameterizedType)
Visits a parameterized type (TypeDefinition.Sort.PARAMETERIZED
).TypeDescription
onTypeVariable(TypeDescription.Generic typeVariable)
Visits a type variable (TypeDefinition.Sort.VARIABLE
,TypeDefinition.Sort.VARIABLE_SYMBOLIC
).TypeDescription
onWildcard(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:
onGenericArray
in 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:
onWildcard
in 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:
onParameterizedType
in 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:
onTypeVariable
in 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:
onNonGenericType
in interfaceTypeDescription.Generic.Visitor<TypeDescription>
- Parameters:
typeDescription
- The non-generic type.- Returns:
- The visitor's return value.
-
-