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

public Class ResolvedObjectType

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

Type implementation for classes that do not represent interfaces, primitive or array types.

Field Summary

Modifier and TypeField and Description
protected RawConstructor[]
_constructors

Constructors declared by the resolved Object class.

protected RawField[]
protected RawMethod[]
protected final int
_modifiers

Modifiers of the underlying class.

protected RawField[]
protected RawMethod[]
protected final ResolvedType
_superClass

While fundamentally super class has to be ResolvedObjectType (or null for java.lang.Object), we may need to hold on to a ResolvedRecursiveType occasionally.

protected final ResolvedType[]
_superInterfaces

List of interfaces this type implements; may be empty but never null

Inherited from com.fasterxml.classmate.ResolvedType:
_erasedType_typeBindingsNO_CONSTRUCTORSNO_FIELDSNO_METHODSNO_TYPES

Constructor Summary

AccessConstructor and Description
public
ResolvedObjectType(Class<?> erased, TypeBindings bindings, ResolvedType superClass, List<ResolvedType> interfaces)

public
ResolvedObjectType(Class<?> erased, TypeBindings bindings, ResolvedType superClass, ResolvedType[] interfaces)

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 static ResolvedObjectType
create(Class<?> erased, TypeBindings bindings, ResolvedType superClass, List<ResolvedType> interfaces)

public final ResolvedType
getArrayElementType()

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

Method that can be used to access element type of array types; will return null for non-array types, and non-null type for array types.
public synchronized List<RawConstructor>
public List<ResolvedType>
getImplementedInterfaces()

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

Returns ordered list of interfaces (in declaration order) that this type directly implements.
public synchronized List<RawField>
public synchronized List<RawMethod>
public ResolvedObjectType
getParentClass()

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

Returns parent class of this type, if it has one; primitive types and interfaces have no parent class, nor does Object type java.lang.Object.
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 synchronized List<RawField>
public synchronized List<RawMethod>
public boolean
public final boolean
isArray()

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

Method that indicates whether this type is an array type.
public final boolean
public final 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.
Inherited from com.fasterxml.classmate.ResolvedType:
_appendClassDescription_appendClassName_appendClassSignature_appendErasedClassSignature_getConstructors_getFields_getMethodscanCreateSubtypeequalsfindSupertypegetBriefDescriptiongetErasedSignaturegetErasedTypegetFullDescriptiongetSignaturegetTypeBindingsgetTypeParametershashCodeisConcreteisInstanceOftoStringtypeParametersFor

Field Detail

_constructorsback to summary
protected RawConstructor[] _constructors

Constructors declared by the resolved Object class.

_memberFieldsback to summary
protected RawField[] _memberFields
_memberMethodsback to summary
protected RawMethod[] _memberMethods
_modifiersback to summary
protected final int _modifiers

Modifiers of the underlying class.

_staticFieldsback to summary
protected RawField[] _staticFields
_staticMethodsback to summary
protected RawMethod[] _staticMethods
_superClassback to summary
protected final ResolvedType _superClass

While fundamentally super class has to be ResolvedObjectType (or null for java.lang.Object), we may need to hold on to a ResolvedRecursiveType occasionally.

_superInterfacesback to summary
protected final ResolvedType[] _superInterfaces

List of interfaces this type implements; may be empty but never null

Constructor Detail

ResolvedObjectTypeback to summary
public ResolvedObjectType(Class<?> erased, TypeBindings bindings, ResolvedType superClass, List<ResolvedType> interfaces)
ResolvedObjectTypeback to summary
public ResolvedObjectType(Class<?> erased, TypeBindings bindings, ResolvedType superClass, ResolvedType[] interfaces)

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
createback to summary
public static ResolvedObjectType create(Class<?> erased, TypeBindings bindings, ResolvedType superClass, List<ResolvedType> interfaces)
getArrayElementTypeback to summary
public final ResolvedType getArrayElementType()

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

Doc from com.fasterxml.classmate.ResolvedType.getArrayElementType.

Method that can be used to access element type of array types; will return null for non-array types, and non-null type for array types.

Annotations
@Override
getConstructorsback to summary
public synchronized 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.

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

Returns ordered list of interfaces (in declaration order) that this type directly implements.

Note

returned list does NOT include transitively implemented types (that is, interfaces implemented by parent classes or interfaces).

Returns:List<ResolvedType>

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

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

Overrides com.fasterxml.classmate.ResolvedType.getMemberFields.

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

Overrides com.fasterxml.classmate.ResolvedType.getMemberMethods.

Annotations
@Override
getParentClassback to summary
public ResolvedObjectType getParentClass()

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

Doc from com.fasterxml.classmate.ResolvedType.getParentClass.

Returns parent class of this type, if it has one; primitive types and interfaces have no parent class, nor does Object type java.lang.Object. Also, placeholders for cyclic (recursive) types return null for this method.

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 synchronized List<RawField> getStaticFields()

Overrides com.fasterxml.classmate.ResolvedType.getStaticFields.

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

Overrides com.fasterxml.classmate.ResolvedType.getStaticMethods.

Annotations
@Override
isAbstractback to summary
public boolean isAbstract()

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

Annotations
@Override
isArrayback to summary
public final 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 final boolean isInterface()

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

Annotations
@Override
isPrimitiveback to summary
public final 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