Package com.fasterxml.classmate.types
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 ResolvedType
Actual fully resolved type; assigned once resolution is completeFields inherited from class com.fasterxml.classmate.ResolvedType
_erasedType, _typeBindings, NO_CONSTRUCTORS, NO_FIELDS, NO_METHODS, NO_TYPES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Method 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.boolean
To 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>
).boolean
boolean
isArray()
Method that indicates whether this type is an array type.boolean
boolean
Method 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.void
setReference
(ResolvedType ref) Methods inherited from class com.fasterxml.classmate.ResolvedType
_appendClassDescription, _appendClassName, _appendClassSignature, _appendErasedClassSignature, _getConstructors, _getFields, _getMethods, canCreateSubtype, findSupertype, getBriefDescription, getErasedSignature, getErasedType, getFullDescription, getSignature, getTypeBindings, getTypeParameters, hashCode, isConcrete, isInstanceOf, toString, typeParametersFor
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.reflect.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:ResolvedType
Method 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:
canCreateSubtypes
in classResolvedType
-
setReference
-
getParentClass
To avoid infinite loops, will return null;- Specified by:
getParentClass
in classResolvedType
-
getSelfReferencedType
Description copied from class:ResolvedType
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>
). For all other types returns null but for self-references "real" type. Separate accessor is provided to avoid accidental infinite loops.- Specified by:
getSelfReferencedType
in classResolvedType
-
getImplementedInterfaces
To avoid infinite loops, will return empty list- Specified by:
getImplementedInterfaces
in 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:
getArrayElementType
in classResolvedType
-
isInterface
public boolean isInterface()- Specified by:
isInterface
in classResolvedType
-
isAbstract
public boolean isAbstract()- Specified by:
isAbstract
in classResolvedType
-
isArray
public boolean isArray()Description copied from class:ResolvedType
Method that indicates whether this type is an array type.- Specified by:
isArray
in classResolvedType
-
isPrimitive
public boolean isPrimitive()Description copied from class:ResolvedType
Method 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:
isPrimitive
in classResolvedType
-
getMemberFields
- Overrides:
getMemberFields
in classResolvedType
-
getStaticFields
- Overrides:
getStaticFields
in classResolvedType
-
getStaticMethods
- Overrides:
getStaticMethods
in classResolvedType
-
getMemberMethods
- Overrides:
getMemberMethods
in classResolvedType
-
getConstructors
- Overrides:
getConstructors
in classResolvedType
-
appendSignature
- Specified by:
appendSignature
in classResolvedType
-
appendErasedSignature
- Specified by:
appendErasedSignature
in classResolvedType
-
appendBriefDescription
- Specified by:
appendBriefDescription
in classResolvedType
-
appendFullDescription
- Specified by:
appendFullDescription
in classResolvedType
-
equals
- Overrides:
equals
in classResolvedType
-