|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fasterxml.classmate.ResolvedType
com.fasterxml.classmate.types.ResolvedRecursiveType
public class ResolvedRecursiveType
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 | |
---|---|
protected ResolvedType |
_referencedType
Actual fully resolved type; assigned once resultion is complete |
Fields inherited from class com.fasterxml.classmate.ResolvedType |
---|
_erasedType, _typeBindings, NO_CONSTRUCTORS, NO_FIELDS, NO_METHODS, NO_TYPES |
Constructor Summary | |
---|---|
ResolvedRecursiveType(Class<?> erased,
TypeBindings bindings)
|
Method Summary | |
---|---|
StringBuilder |
appendBriefDescription(StringBuilder sb)
|
StringBuilder |
appendErasedSignature(StringBuilder sb)
|
StringBuilder |
appendFullDescription(StringBuilder sb)
|
StringBuilder |
appendSignature(StringBuilder sb)
|
boolean |
canCreateSubtypes()
Method that can be used to check if call to TypeResolver.resolveSubtype(ResolvedType, Class)
may ever succeed; if false, it will fail with an exception, if true, it may succeed. |
ResolvedType |
getArrayElementType()
To avoid infinite loops, will return null type |
List<RawConstructor> |
getConstructors()
|
List<ResolvedType> |
getImplementedInterfaces()
To avoid infinite loops, will return empty list |
List<RawField> |
getMemberFields()
|
List<RawMethod> |
getMemberMethods()
|
ResolvedType |
getParentClass()
To avoid infinite loops, will return null; |
ResolvedType |
getSelfReferencedType()
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> ). |
List<RawField> |
getStaticFields()
|
List<RawMethod> |
getStaticMethods()
|
boolean |
isAbstract()
|
boolean |
isArray()
Method that indicates whether this type is an array type. |
boolean |
isInterface()
|
boolean |
isPrimitive()
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, equals, 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 |
Field Detail |
---|
protected ResolvedType _referencedType
Constructor Detail |
---|
public ResolvedRecursiveType(Class<?> erased, TypeBindings bindings)
Method Detail |
---|
public boolean canCreateSubtypes()
ResolvedType
TypeResolver.resolveSubtype(ResolvedType, Class)
may ever succeed; if false, it will fail with an exception, if true, it may succeed.
canCreateSubtypes
in class ResolvedType
public void setReference(ResolvedType ref)
public ResolvedType getParentClass()
getParentClass
in class ResolvedType
public ResolvedType getSelfReferencedType()
ResolvedType
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.
getSelfReferencedType
in class ResolvedType
public List<ResolvedType> getImplementedInterfaces()
getImplementedInterfaces
in class ResolvedType
public ResolvedType getArrayElementType()
getArrayElementType
in class ResolvedType
public boolean isInterface()
isInterface
in class ResolvedType
public boolean isAbstract()
isAbstract
in class ResolvedType
public boolean isArray()
ResolvedType
isArray
in class ResolvedType
public boolean isPrimitive()
ResolvedType
isPrimitive
in class ResolvedType
public List<RawField> getMemberFields()
getMemberFields
in class ResolvedType
public List<RawField> getStaticFields()
getStaticFields
in class ResolvedType
public List<RawMethod> getStaticMethods()
getStaticMethods
in class ResolvedType
public List<RawMethod> getMemberMethods()
getMemberMethods
in class ResolvedType
public List<RawConstructor> getConstructors()
getConstructors
in class ResolvedType
public StringBuilder appendSignature(StringBuilder sb)
appendSignature
in class ResolvedType
public StringBuilder appendErasedSignature(StringBuilder sb)
appendErasedSignature
in class ResolvedType
public StringBuilder appendBriefDescription(StringBuilder sb)
appendBriefDescription
in class ResolvedType
public StringBuilder appendFullDescription(StringBuilder sb)
appendFullDescription
in class ResolvedType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |