|
||||||||||
| 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.ResolvedObjectType
public class ResolvedObjectType
Type implementation for classes that do not represent interfaces, primitive or array types.
| Field Summary | |
|---|---|
protected RawConstructor[] |
_constructors
Constructors declared by the resolved Object class. |
protected RawField[] |
_memberFields
|
protected RawMethod[] |
_memberMethods
|
protected int |
_modifiers
Modifiers of the underlying class. |
protected RawField[] |
_staticFields
|
protected RawMethod[] |
_staticMethods
|
protected ResolvedObjectType |
_superClass
|
protected ResolvedType[] |
_superInterfaces
List of interfaces this type implements; may be empty but never null |
| Fields inherited from class com.fasterxml.classmate.ResolvedType |
|---|
_erasedType, _typeBindings, NO_CONSTRUCTORS, NO_FIELDS, NO_METHODS, NO_TYPES |
| Constructor Summary | |
|---|---|
ResolvedObjectType(Class<?> erased,
TypeBindings bindings,
ResolvedObjectType superClass,
List<ResolvedType> interfaces)
|
|
ResolvedObjectType(Class<?> erased,
TypeBindings bindings,
ResolvedObjectType superClass,
ResolvedType[] interfaces)
|
|
| 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()
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. |
List<RawConstructor> |
getConstructors()
|
List<ResolvedType> |
getImplementedInterfaces()
Returns ordered list of interfaces (in declaration order) that this type implements. |
List<RawField> |
getMemberFields()
|
List<RawMethod> |
getMemberMethods()
|
ResolvedObjectType |
getParentClass()
Returns parent class of this type, if it has one; primitive types and interfaces have no parent class, nor does Object type Object. |
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. |
| 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 final ResolvedObjectType _superClass
protected final ResolvedType[] _superInterfaces
protected final int _modifiers
protected RawConstructor[] _constructors
protected RawField[] _memberFields
protected RawField[] _staticFields
protected RawMethod[] _memberMethods
protected RawMethod[] _staticMethods
| Constructor Detail |
|---|
public ResolvedObjectType(Class<?> erased,
TypeBindings bindings,
ResolvedObjectType superClass,
List<ResolvedType> interfaces)
public ResolvedObjectType(Class<?> erased,
TypeBindings bindings,
ResolvedObjectType superClass,
ResolvedType[] interfaces)
| Method Detail |
|---|
public boolean canCreateSubtypes()
ResolvedTypeTypeResolver.resolveSubtype(ResolvedType, Class)
may ever succeed; if false, it will fail with an exception, if true, it may succeed.
canCreateSubtypes in class ResolvedTypepublic ResolvedObjectType getParentClass()
ResolvedTypeObject.
Also, placeholders for cyclic (recursive) types return null for
this method.
getParentClass in class ResolvedTypepublic ResolvedType getSelfReferencedType()
ResolvedTypeT 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 ResolvedTypepublic List<ResolvedType> getImplementedInterfaces()
ResolvedType
getImplementedInterfaces in class ResolvedTypepublic final ResolvedType getArrayElementType()
ResolvedType
getArrayElementType in class ResolvedTypepublic final boolean isInterface()
isInterface in class ResolvedTypepublic boolean isAbstract()
isAbstract in class ResolvedTypepublic final boolean isArray()
ResolvedType
isArray in class ResolvedTypepublic final boolean isPrimitive()
ResolvedType
isPrimitive in class ResolvedTypepublic List<RawField> getMemberFields()
getMemberFields in class ResolvedTypepublic List<RawField> getStaticFields()
getStaticFields in class ResolvedTypepublic List<RawMethod> getMemberMethods()
getMemberMethods in class ResolvedTypepublic List<RawMethod> getStaticMethods()
getStaticMethods in class ResolvedTypepublic List<RawConstructor> getConstructors()
getConstructors in class ResolvedTypepublic StringBuilder appendSignature(StringBuilder sb)
appendSignature in class ResolvedTypepublic StringBuilder appendErasedSignature(StringBuilder sb)
appendErasedSignature in class ResolvedTypepublic StringBuilder appendBriefDescription(StringBuilder sb)
appendBriefDescription in class ResolvedTypepublic StringBuilder appendFullDescription(StringBuilder sb)
appendFullDescription in class ResolvedType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||