Top Description Fields Constructors Methods
com.fasterxml.classmate.types

public Class ResolvedRecursiveType

extends ResolvedType
Class Inheritance
Imports
java.lang.reflect.Modifier, java.util.*, com.fasterxml.classmate.ResolvedType, .TypeBindings, com.fasterxml.classmate.members.RawConstructor, .RawField, .RawMethod

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

Modifier and TypeField and Description
protected ResolvedType
_referencedType

Actual fully resolved type; assigned once resolution is complete

Inherited from com.fasterxml.classmate.ResolvedType:
_erasedType_typeBindingsNO_CONSTRUCTORSNO_FIELDSNO_METHODSNO_TYPES

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public StringBuilder
public StringBuilder
public StringBuilder
public StringBuilder
public boolean
canCreateSubtypes()

Implements abstract com.fasterxml.classmate.ResolvedType.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.
public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides com.fasterxml.classmate.ResolvedType.equals.

Indicates whether some other object is "equal to" this one.
public ResolvedType
getArrayElementType()

Implements abstract com.fasterxml.classmate.ResolvedType.getArrayElementType.

To avoid infinite loops, will return null type
public List<RawConstructor>
public List<ResolvedType>
getImplementedInterfaces()

Implements abstract com.fasterxml.classmate.ResolvedType.getImplementedInterfaces.

To avoid infinite loops, will return empty list
public List<RawField>
public List<RawMethod>
public ResolvedType
getParentClass()

Implements abstract com.fasterxml.classmate.ResolvedType.getParentClass.

To avoid infinite loops, will return null;
public ResolvedType
getSelfReferencedType()

Implements abstract com.fasterxml.classmate.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>).
public List<RawField>
public List<RawMethod>
public int
hashCode()

Overrides com.fasterxml.classmate.ResolvedType.hashCode.

Returns a hash code value for the object.
public boolean
public boolean
isArray()

Implements abstract com.fasterxml.classmate.ResolvedType.isArray.

Method that indicates whether this type is an array type.
public boolean
public boolean
isPrimitive()

Implements abstract com.fasterxml.classmate.ResolvedType.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.
public void
Inherited from com.fasterxml.classmate.ResolvedType:
_appendClassDescription_appendClassName_appendClassSignature_appendErasedClassSignature_getConstructors_getFields_getMethodscanCreateSubtypefindSupertypegetBriefDescriptiongetErasedSignaturegetErasedTypegetFullDescriptiongetSignaturegetTypeBindingsgetTypeParametersisConcreteisInstanceOftoStringtypeParametersFor

Field Detail

_referencedTypeback to summary
protected ResolvedType _referencedType

Actual fully resolved type; assigned once resolution is complete

Constructor Detail

ResolvedRecursiveTypeback to summary
public ResolvedRecursiveType(Class<?> erased, TypeBindings bindings)

Method Detail

appendBriefDescriptionback to summary
public StringBuilder appendBriefDescription(StringBuilder sb)

Implements abstract com.fasterxml.classmate.ResolvedType.appendBriefDescription.

Annotations
@Override
appendErasedSignatureback to summary
public StringBuilder appendErasedSignature(StringBuilder sb)

Implements abstract com.fasterxml.classmate.ResolvedType.appendErasedSignature.

Annotations
@Override
appendFullDescriptionback to summary
public StringBuilder appendFullDescription(StringBuilder sb)

Implements abstract com.fasterxml.classmate.ResolvedType.appendFullDescription.

Annotations
@Override
appendSignatureback to summary
public StringBuilder appendSignature(StringBuilder sb)

Implements abstract com.fasterxml.classmate.ResolvedType.appendSignature.

Annotations
@Override
canCreateSubtypesback to summary
public boolean canCreateSubtypes()

Implements abstract com.fasterxml.classmate.ResolvedType.canCreateSubtypes.

Doc from com.fasterxml.classmate.ResolvedType.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.

Annotations
@Override
equalsback to summary
public boolean equals(Object o)

Overrides com.fasterxml.classmate.ResolvedType.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getArrayElementTypeback to summary
public ResolvedType getArrayElementType()

Implements abstract com.fasterxml.classmate.ResolvedType.getArrayElementType.

To avoid infinite loops, will return null type

Annotations
@Override
getConstructorsback to summary
public List<RawConstructor> getConstructors()

Overrides com.fasterxml.classmate.ResolvedType.getConstructors.

Annotations
@Override
getImplementedInterfacesback to summary
public List<ResolvedType> getImplementedInterfaces()

Implements abstract com.fasterxml.classmate.ResolvedType.getImplementedInterfaces.

To avoid infinite loops, will return empty list

Returns:List<ResolvedType>

Doc from com.fasterxml.classmate.ResolvedType.getImplementedInterfaces.

List of interfaces this type implements, if any; empty list if none (never null).

Annotations
@Override
getMemberFieldsback to summary
public List<RawField> getMemberFields()

Overrides com.fasterxml.classmate.ResolvedType.getMemberFields.

Annotations
@Override
getMemberMethodsback to summary
public List<RawMethod> getMemberMethods()

Overrides com.fasterxml.classmate.ResolvedType.getMemberMethods.

Annotations
@Override
getParentClassback to summary
public ResolvedType getParentClass()

Implements abstract com.fasterxml.classmate.ResolvedType.getParentClass.

To avoid infinite loops, will return null;

Annotations
@Override
getSelfReferencedTypeback to summary
public ResolvedType getSelfReferencedType()

Implements abstract com.fasterxml.classmate.ResolvedType.getSelfReferencedType.

Doc from com.fasterxml.classmate.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>). For all other types returns null but for self-references "real" type. Separate accessor is provided to avoid accidental infinite loops.

Annotations
@Override
getStaticFieldsback to summary
public List<RawField> getStaticFields()

Overrides com.fasterxml.classmate.ResolvedType.getStaticFields.

Annotations
@Override
getStaticMethodsback to summary
public List<RawMethod> getStaticMethods()

Overrides com.fasterxml.classmate.ResolvedType.getStaticMethods.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides com.fasterxml.classmate.ResolvedType.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
isAbstractback to summary
public boolean isAbstract()

Implements abstract com.fasterxml.classmate.ResolvedType.isAbstract.

Annotations
@Override
isArrayback to summary
public boolean isArray()

Implements abstract com.fasterxml.classmate.ResolvedType.isArray.

Doc from com.fasterxml.classmate.ResolvedType.isArray.

Method that indicates whether this type is an array type.

Annotations
@Override
isInterfaceback to summary
public boolean isInterface()

Implements abstract com.fasterxml.classmate.ResolvedType.isInterface.

Annotations
@Override
isPrimitiveback to summary
public boolean isPrimitive()

Implements abstract com.fasterxml.classmate.ResolvedType.isPrimitive.

Doc from com.fasterxml.classmate.ResolvedType.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.

Annotations
@Override
setReferenceback to summary
public void setReference(ResolvedType ref)