Package com.fasterxml.classmate.types
Class ResolvedObjectType
java.lang.Object
com.fasterxml.classmate.ResolvedType
com.fasterxml.classmate.types.ResolvedObjectType
- All Implemented Interfaces:
Type
Type implementation for classes that do not represent interfaces,
primitive or array types.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RawConstructor[]
Constructors declared by the resolved Object class.protected RawField[]
protected RawMethod[]
protected final int
Modifiers of the underlying class.protected RawField[]
protected RawMethod[]
protected final ResolvedType
While fundamentally super class has to beResolvedObjectType
(or null forObject
), we may need to hold on to aResolvedRecursiveType
occasionally.protected final ResolvedType[]
List of interfaces this type implements; may be empty but never nullFields inherited from class com.fasterxml.classmate.ResolvedType
_erasedType, _typeBindings, NO_CONSTRUCTORS, NO_FIELDS, NO_METHODS, NO_TYPES
-
Constructor Summary
ConstructorsConstructorDescriptionResolvedObjectType
(Class<?> erased, TypeBindings bindings, ResolvedType superClass, ResolvedType[] interfaces) ResolvedObjectType
(Class<?> erased, TypeBindings bindings, ResolvedType superClass, List<ResolvedType> interfaces) ResolvedObjectType
(Class<?> erased, TypeBindings bindings, ResolvedObjectType superClass, ResolvedType[] interfaces) Deprecated.ResolvedObjectType
(Class<?> erased, TypeBindings bindings, ResolvedObjectType superClass, List<ResolvedType> interfaces) Deprecated. -
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.static ResolvedObjectType
create
(Class<?> erased, TypeBindings bindings, ResolvedType superClass, List<ResolvedType> interfaces) final ResolvedType
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.Returns ordered list of interfaces (in declaration order) that this type implements.Returns parent class of this type, if it has one; primitive types and interfaces have no parent class, nor does Object typeObject
.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
final boolean
isArray()
Method that indicates whether this type is an array type.final boolean
final 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.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
Methods inherited from interface java.lang.reflect.Type
getTypeName
-
Field Details
-
_superClass
While fundamentally super class has to beResolvedObjectType
(or null forObject
), we may need to hold on to aResolvedRecursiveType
occasionally. -
_superInterfaces
List of interfaces this type implements; may be empty but never null -
_modifiers
protected final int _modifiersModifiers of the underlying class. -
_constructors
Constructors declared by the resolved Object class. -
_memberFields
-
_staticFields
-
_memberMethods
-
_staticMethods
-
-
Constructor Details
-
ResolvedObjectType
public ResolvedObjectType(Class<?> erased, TypeBindings bindings, ResolvedType superClass, List<ResolvedType> interfaces) -
ResolvedObjectType
public ResolvedObjectType(Class<?> erased, TypeBindings bindings, ResolvedType superClass, ResolvedType[] interfaces) -
ResolvedObjectType
@Deprecated public ResolvedObjectType(Class<?> erased, TypeBindings bindings, ResolvedObjectType superClass, List<ResolvedType> interfaces) Deprecated. -
ResolvedObjectType
@Deprecated public ResolvedObjectType(Class<?> erased, TypeBindings bindings, ResolvedObjectType superClass, ResolvedType[] interfaces) Deprecated.
-
-
Method Details
-
create
public static ResolvedObjectType create(Class<?> erased, TypeBindings bindings, ResolvedType superClass, List<ResolvedType> interfaces) -
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
-
getParentClass
Description copied from class:ResolvedType
Returns parent class of this type, if it has one; primitive types and interfaces have no parent class, nor does Object typeObject
. Also, placeholders for cyclic (recursive) types return null for this method.- 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
Description copied from class:ResolvedType
Returns ordered list of interfaces (in declaration order) that this type implements.- Specified by:
getImplementedInterfaces
in classResolvedType
- Returns:
- List of interfaces this type implements, if any; empty list if none
-
getArrayElementType
Description copied from class:ResolvedType
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.- Specified by:
getArrayElementType
in classResolvedType
-
isInterface
public final boolean isInterface()- Specified by:
isInterface
in classResolvedType
-
isAbstract
public boolean isAbstract()- Specified by:
isAbstract
in classResolvedType
-
isArray
public final boolean isArray()Description copied from class:ResolvedType
Method that indicates whether this type is an array type.- Specified by:
isArray
in classResolvedType
-
isPrimitive
public final 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
-
getMemberMethods
- Overrides:
getMemberMethods
in classResolvedType
-
getStaticMethods
- Overrides:
getStaticMethods
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
-