Class GenericTypeAwareAssigner.IsAssignableToVisitor
java.lang.Object
net.bytebuddy.implementation.bytecode.assign.reference.GenericTypeAwareAssigner.IsAssignableToVisitor
- All Implemented Interfaces:
TypeDescription.Generic.Visitor<Boolean>
- Enclosing class:
GenericTypeAwareAssigner
@Enhance
protected static class GenericTypeAwareAssigner.IsAssignableToVisitor
extends Object
implements TypeDescription.Generic.Visitor<Boolean>
A visitor for generic types that determines assignability of such types.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA visitor for determining assignability of a generic array type.protected static classAn implementation of a assignability visitor that is applicable for any non-wildcard type.protected static classA visitor for determining assignability of a non-generic type.protected static classA visitor for determining the assignability of a parameterized type.protected static classA visitor for determining assignability of a type in a type hierarchy, i.e.protected static classA visitor to determine the assignability of a wildcard type.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 booleantrueif the assignment is polymorphic.private final TypeDescription.GenericThe type to which another type is being assigned. -
Constructor Summary
ConstructorsModifierConstructorDescriptionIsAssignableToVisitor(TypeDescription.Generic typeDescription) Creates a new visitor to determine assignability of the supplied type.protectedIsAssignableToVisitor(TypeDescription.Generic typeDescription, boolean polymorphic) Creates a new visitor to determine assignability of the supplied type. -
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
-
typeDescription
The type to which another type is being assigned. -
polymorphic
private final boolean polymorphictrueif the assignment is polymorphic.
-
-
Constructor Details
-
IsAssignableToVisitor
Creates a new visitor to determine assignability of the supplied type.- Parameters:
typeDescription- The type to which another type is being assigned.
-
IsAssignableToVisitor
Creates a new visitor to determine assignability of the supplied type.- Parameters:
typeDescription- The type to which another type is being assigned.polymorphic-trueif the assignment is polymorphic.
-
-
Method Details
-
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.
-