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 classGenericTypeAwareAssigner.IsAssignableToVisitor.OfGenericArrayA visitor for determining assignability of a generic array type.protected static classGenericTypeAwareAssigner.IsAssignableToVisitor.OfManifestTypeAn implementation of a assignability visitor that is applicable for any non-wildcard type.protected static classGenericTypeAwareAssigner.IsAssignableToVisitor.OfNonGenericTypeA visitor for determining assignability of a non-generic type.protected static classGenericTypeAwareAssigner.IsAssignableToVisitor.OfParameterizedTypeA visitor for determining the assignability of a parameterized type.protected static classGenericTypeAwareAssigner.IsAssignableToVisitor.OfSimpleTypeA visitor for determining assignability of a type in a type hierarchy, i.e.protected static classGenericTypeAwareAssigner.IsAssignableToVisitor.OfWildcardA 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 booleanpolymorphictrueif the assignment is polymorphic.private TypeDescription.GenerictypeDescriptionThe 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.protectedIsAssignableToVisitor(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.BooleanonGenericArray(TypeDescription.Generic genericArray)Visits a generic array type (TypeDefinition.Sort.GENERIC_ARRAY).java.lang.BooleanonNonGenericType(TypeDescription.Generic typeDescription)Visits a non-generic type (TypeDefinition.Sort.NON_GENERIC).java.lang.BooleanonParameterizedType(TypeDescription.Generic parameterizedType)Visits a parameterized type (TypeDefinition.Sort.PARAMETERIZED).java.lang.BooleanonTypeVariable(TypeDescription.Generic typeVariable)Visits a type variable (TypeDefinition.Sort.VARIABLE,TypeDefinition.Sort.VARIABLE_SYMBOLIC).java.lang.BooleanonWildcard(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
trueif 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-trueif 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:
onGenericArrayin 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:
onWildcardin 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:
onParameterizedTypein 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:
onTypeVariablein 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:
onNonGenericTypein interfaceTypeDescription.Generic.Visitor<java.lang.Boolean>- Parameters:
typeDescription- The non-generic type.- Returns:
- The visitor's return value.
-
-