Class GenericTypeAwareAssigner.IsAssignableToVisitor
- java.lang.Object
-
- net.bytebuddy.implementation.bytecode.assign.reference.GenericTypeAwareAssigner.IsAssignableToVisitor
-
- All Implemented Interfaces:
TypeDescription.Generic.Visitor<java.lang.Boolean>
- Enclosing class:
- GenericTypeAwareAssigner
@Enhance protected static class GenericTypeAwareAssigner.IsAssignableToVisitor extends java.lang.Object implements TypeDescription.Generic.Visitor<java.lang.Boolean>
A visitor for generic types that determines assignability of such types.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
GenericTypeAwareAssigner.IsAssignableToVisitor.OfGenericArray
A visitor for determining assignability of a generic array type.protected static class
GenericTypeAwareAssigner.IsAssignableToVisitor.OfManifestType
An implementation of a assignability visitor that is applicable for any non-wildcard type.protected static class
GenericTypeAwareAssigner.IsAssignableToVisitor.OfNonGenericType
A visitor for determining assignability of a non-generic type.protected static class
GenericTypeAwareAssigner.IsAssignableToVisitor.OfParameterizedType
A visitor for determining the assignability of a parameterized type.protected static class
GenericTypeAwareAssigner.IsAssignableToVisitor.OfSimpleType
A visitor for determining assignability of a type in a type hierarchy, i.e.protected static class
GenericTypeAwareAssigner.IsAssignableToVisitor.OfWildcard
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
Fields Modifier and Type Field Description private boolean
polymorphic
true
if the assignment is polymorphic.private TypeDescription.Generic
typeDescription
The type to which another type is being assigned.
-
Constructor Summary
Constructors Modifier Constructor Description IsAssignableToVisitor(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
onGenericArray(TypeDescription.Generic genericArray)
Visits a generic array type (TypeDefinition.Sort.GENERIC_ARRAY
).java.lang.Boolean
onNonGenericType(TypeDescription.Generic typeDescription)
Visits a non-generic type (TypeDefinition.Sort.NON_GENERIC
).java.lang.Boolean
onParameterizedType(TypeDescription.Generic parameterizedType)
Visits a parameterized type (TypeDefinition.Sort.PARAMETERIZED
).java.lang.Boolean
onTypeVariable(TypeDescription.Generic typeVariable)
Visits a type variable (TypeDefinition.Sort.VARIABLE
,TypeDefinition.Sort.VARIABLE_SYMBOLIC
).java.lang.Boolean
onWildcard(TypeDescription.Generic wildcard)
Visits a wildcard (TypeDefinition.Sort.WILDCARD
).
-
-
-
Field Detail
-
typeDescription
private final TypeDescription.Generic typeDescription
The type to which another type is being assigned.
-
polymorphic
private final boolean polymorphic
true
if the assignment is polymorphic.
-
-
Constructor Detail
-
IsAssignableToVisitor
public IsAssignableToVisitor(TypeDescription.Generic typeDescription)
Creates a new visitor to determine assignability of the supplied type.- Parameters:
typeDescription
- The type to which another type is being assigned.
-
IsAssignableToVisitor
protected IsAssignableToVisitor(TypeDescription.Generic typeDescription, boolean polymorphic)
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 Detail
-
onGenericArray
public java.lang.Boolean onGenericArray(TypeDescription.Generic genericArray)
Visits a generic array type (TypeDefinition.Sort.GENERIC_ARRAY
).- Specified by:
onGenericArray
in interfaceTypeDescription.Generic.Visitor<java.lang.Boolean>
- Parameters:
genericArray
- The generic array type.- Returns:
- The visitor's return value.
-
onWildcard
public java.lang.Boolean onWildcard(TypeDescription.Generic wildcard)
Visits a wildcard (TypeDefinition.Sort.WILDCARD
).- Specified by:
onWildcard
in interfaceTypeDescription.Generic.Visitor<java.lang.Boolean>
- Parameters:
wildcard
- The wildcard.- Returns:
- The visitor's return value.
-
onParameterizedType
public java.lang.Boolean onParameterizedType(TypeDescription.Generic parameterizedType)
Visits a parameterized type (TypeDefinition.Sort.PARAMETERIZED
).- Specified by:
onParameterizedType
in interfaceTypeDescription.Generic.Visitor<java.lang.Boolean>
- Parameters:
parameterizedType
- The generic array type.- Returns:
- The visitor's return value.
-
onTypeVariable
public java.lang.Boolean onTypeVariable(TypeDescription.Generic typeVariable)
Visits a type variable (TypeDefinition.Sort.VARIABLE
,TypeDefinition.Sort.VARIABLE_SYMBOLIC
).- Specified by:
onTypeVariable
in interfaceTypeDescription.Generic.Visitor<java.lang.Boolean>
- Parameters:
typeVariable
- The generic array type.- Returns:
- The visitor's return value.
-
onNonGenericType
public java.lang.Boolean onNonGenericType(TypeDescription.Generic typeDescription)
Visits a non-generic type (TypeDefinition.Sort.NON_GENERIC
).- Specified by:
onNonGenericType
in interfaceTypeDescription.Generic.Visitor<java.lang.Boolean>
- Parameters:
typeDescription
- The non-generic type.- Returns:
- The visitor's return value.
-
-