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 class
A visitor for determining assignability of a generic array type.protected static class
An implementation of a assignability visitor that is applicable for any non-wildcard type.protected static class
A visitor for determining assignability of a non-generic type.protected static class
A visitor for determining the assignability of a parameterized type.protected static class
A visitor for determining assignability of a type in a type hierarchy, i.e.protected static class
A visitor to determine the assignability of a wildcard type.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
FieldsModifier and TypeFieldDescriptionprivate final boolean
true
if the assignment is polymorphic.private final TypeDescription.Generic
The 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.protected
IsAssignableToVisitor
(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 polymorphictrue
if 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
-true
if the assignment is polymorphic.
-
-
Method Details
-
onGenericArray
Visits a generic array type (TypeDefinition.Sort.GENERIC_ARRAY
).- Specified by:
onGenericArray
in 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:
onWildcard
in interfaceTypeDescription.Generic.Visitor<Boolean>
- Parameters:
wildcard
- The wildcard.- Returns:
- The visitor's return value.
-
onParameterizedType
Visits a parameterized type (TypeDefinition.Sort.PARAMETERIZED
).- Specified by:
onParameterizedType
in 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:
onTypeVariable
in 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:
onNonGenericType
in interfaceTypeDescription.Generic.Visitor<Boolean>
- Parameters:
typeDescription
- The non-generic type.- Returns:
- The visitor's return value.
-