Class ResolvedRecursiveType
java.lang.Object
com.fasterxml.classmate.ResolvedType
com.fasterxml.classmate.types.ResolvedRecursiveType
- All Implemented Interfaces:
Type
Specialized type placeholder used in cases where type definition is
recursive; to avoid infinite loop, reference that would be "back" in
hierarchy is represented by an instance of this class.
Underlying information is achievable (for full resolution), but
not exposed using super type (parent) accessors; and has special
handling when used for constructing descriptions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ResolvedTypeActual fully resolved type; assigned once resolution is completeFields inherited from class ResolvedType
_erasedType, _typeBindings, NO_CONSTRUCTORS, NO_FIELDS, NO_METHODS, NO_TYPES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanMethod that can be used to check if call toTypeResolver.resolveSubtype(ResolvedType, Class)may ever succeed; if false, it will fail with an exception, if true, it may succeed.booleanTo avoid infinite loops, will return null typeTo avoid infinite loops, will return empty listTo avoid infinite loops, will return null;Accessor that must be used to find out actual type in case of "self-reference"; case where type refers recursive to itself (like,T implements Comparable<T>).booleanbooleanisArray()Method that indicates whether this type is an array type.booleanbooleanMethod that indicates whether this type is one of small number of primitive Java types; not including array types of primitive types but just basic primitive types.voidsetReference(ResolvedType ref) Methods inherited from class ResolvedType
_appendClassDescription, _appendClassName, _appendClassSignature, _appendErasedClassSignature, _getConstructors, _getFields, _getMethods, canCreateSubtype, findSupertype, getBriefDescription, getErasedSignature, getErasedType, getFullDescription, getSignature, getTypeBindings, getTypeParameters, hashCode, isConcrete, isInstanceOf, toString, typeParametersForMethods inherited from interface Type
getTypeName
-
Field Details
-
_referencedType
Actual fully resolved type; assigned once resolution is complete
-
-
Constructor Details
-
ResolvedRecursiveType
-
-
Method Details
-
canCreateSubtypes
public boolean canCreateSubtypes()Description copied from class:ResolvedTypeMethod that can be used to check if call toTypeResolver.resolveSubtype(ResolvedType, Class)may ever succeed; if false, it will fail with an exception, if true, it may succeed.- Specified by:
canCreateSubtypesin classResolvedType
-
setReference
-
getParentClass
To avoid infinite loops, will return null;- Specified by:
getParentClassin classResolvedType
-
getSelfReferencedType
Description copied from class:ResolvedTypeAccessor that must be used to find out actual type in case of "self-reference"; case where type refers recursive to itself (like,T implements Comparable<T>). For all other types returns null but for self-references "real" type. Separate accessor is provided to avoid accidental infinite loops.- Specified by:
getSelfReferencedTypein classResolvedType
-
getImplementedInterfaces
To avoid infinite loops, will return empty list- Specified by:
getImplementedInterfacesin classResolvedType- Returns:
- List of interfaces this type implements, if any; empty list if none
-
getArrayElementType
To avoid infinite loops, will return null type- Specified by:
getArrayElementTypein classResolvedType
-
isInterface
public boolean isInterface()- Specified by:
isInterfacein classResolvedType
-
isAbstract
public boolean isAbstract()- Specified by:
isAbstractin classResolvedType
-
isArray
public boolean isArray()Description copied from class:ResolvedTypeMethod that indicates whether this type is an array type.- Specified by:
isArrayin classResolvedType
-
isPrimitive
public boolean isPrimitive()Description copied from class:ResolvedTypeMethod that indicates whether this type is one of small number of primitive Java types; not including array types of primitive types but just basic primitive types.- Specified by:
isPrimitivein classResolvedType
-
getMemberFields
- Overrides:
getMemberFieldsin classResolvedType
-
getStaticFields
- Overrides:
getStaticFieldsin classResolvedType
-
getStaticMethods
- Overrides:
getStaticMethodsin classResolvedType
-
getMemberMethods
- Overrides:
getMemberMethodsin classResolvedType
-
getConstructors
- Overrides:
getConstructorsin classResolvedType
-
appendSignature
- Specified by:
appendSignaturein classResolvedType
-
appendErasedSignature
- Specified by:
appendErasedSignaturein classResolvedType
-
appendBriefDescription
- Specified by:
appendBriefDescriptionin classResolvedType
-
appendFullDescription
- Specified by:
appendFullDescriptionin classResolvedType
-
equals
- Overrides:
equalsin classResolvedType
-