public abstract class ResolvedType extends Object
Modifier and Type | Field and Description |
---|---|
protected Class<?> |
_erasedType |
protected TypeBindings |
_typeBindings
Type bindings active when resolving members (methods, fields,
constructors) of this type
|
protected static RawConstructor[] |
NO_CONSTRUCTORS |
protected static RawField[] |
NO_FIELDS |
protected static RawMethod[] |
NO_METHODS |
protected static ResolvedType[] |
NO_TYPES |
Modifier | Constructor and Description |
---|---|
protected |
ResolvedType(Class<?> cls,
TypeBindings bindings) |
Modifier and Type | Method and Description |
---|---|
protected StringBuilder |
_appendClassDescription(StringBuilder sb) |
protected StringBuilder |
_appendClassName(StringBuilder sb) |
protected StringBuilder |
_appendClassSignature(StringBuilder sb) |
protected StringBuilder |
_appendErasedClassSignature(StringBuilder sb) |
protected RawConstructor[] |
_getConstructors() |
protected RawField[] |
_getFields(boolean statics) |
protected RawMethod[] |
_getMethods(boolean statics) |
abstract StringBuilder |
appendBriefDescription(StringBuilder sb) |
abstract StringBuilder |
appendErasedSignature(StringBuilder sb) |
abstract StringBuilder |
appendFullDescription(StringBuilder sb) |
abstract StringBuilder |
appendSignature(StringBuilder sb) |
boolean |
canCreateSubtype(Class<?> subtype)
Method that can be used to check if call to
TypeResolver.resolveSubtype(ResolvedType, Class)
will succeed for specific type; if false, it will fail with an exception; if tru it
will succeed. |
abstract 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. |
boolean |
equals(Object o) |
ResolvedType |
findSupertype(Class<?> erasedSupertype)
Method for finding super type of this type that has specified type
erased signature.
|
abstract 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.
|
String |
getBriefDescription()
Human-readable brief description of type, which does not include
information about super types.
|
List<RawConstructor> |
getConstructors() |
String |
getErasedSignature()
Method that returns type erased signature of the type; suitable
as non-generic signature some packages need
|
Class<?> |
getErasedType()
Returns type-erased Class> that this resolved type has.
|
String |
getFullDescription()
Human-readable full description of type, which includes specification
of super types (in brief format)
|
abstract List<ResolvedType> |
getImplementedInterfaces()
Returns ordered list of interfaces (in declaration order) that this type
implements.
|
List<RawField> |
getMemberFields() |
List<RawMethod> |
getMemberMethods() |
abstract ResolvedType |
getParentClass()
Returns parent class of this type, if it has one; primitive types
and interfaces have no parent class, nor does Object type
Object . |
abstract 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> ). |
String |
getSignature()
Method that returns full generic signature of the type; suitable
as signature for things like ASM package.
|
List<RawField> |
getStaticFields() |
List<RawMethod> |
getStaticMethods() |
TypeBindings |
getTypeBindings()
Method for accessing bindings of type variables to resolved types in context
of this type.
|
List<ResolvedType> |
getTypeParameters()
Returns list of generic type declarations for this type, in order they
are declared in class description.
|
int |
hashCode() |
abstract boolean |
isAbstract() |
abstract boolean |
isArray()
Method that indicates whether this type is an array type.
|
boolean |
isConcrete() |
boolean |
isInstanceOf(Class<?> type) |
abstract boolean |
isInterface() |
abstract 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.
|
String |
toString() |
List<ResolvedType> |
typeParametersFor(Class<?> erasedSupertype)
Method that will try to find type parameterization this type
has for specified super type
|
protected static final ResolvedType[] NO_TYPES
protected static final RawConstructor[] NO_CONSTRUCTORS
protected static final RawField[] NO_FIELDS
protected static final RawMethod[] NO_METHODS
protected final Class<?> _erasedType
protected final TypeBindings _typeBindings
protected ResolvedType(Class<?> cls, TypeBindings bindings)
public abstract boolean canCreateSubtypes()
TypeResolver.resolveSubtype(ResolvedType, Class)
may ever succeed; if false, it will fail with an exception, if true, it may succeed.public final boolean canCreateSubtype(Class<?> subtype)
TypeResolver.resolveSubtype(ResolvedType, Class)
will succeed for specific type; if false, it will fail with an exception; if tru it
will succeed.public Class<?> getErasedType()
public abstract ResolvedType getParentClass()
Object
.
Also, placeholders for cyclic (recursive) types return null for
this method.public abstract ResolvedType getSelfReferencedType()
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.public abstract ResolvedType getArrayElementType()
public abstract List<ResolvedType> getImplementedInterfaces()
public List<ResolvedType> getTypeParameters()
public TypeBindings getTypeBindings()
getTypeParameters()
, accessible using declared name to which they
bind; for example, Map
has 2 type bindings; one for
key type (name "K", from Map.java) and one for value type
(name "V", from Map.java).public List<ResolvedType> typeParametersFor(Class<?> erasedSupertype)
public ResolvedType findSupertype(Class<?> erasedSupertype)
public abstract boolean isInterface()
public final boolean isConcrete()
public abstract boolean isAbstract()
public abstract boolean isArray()
public abstract boolean isPrimitive()
public final boolean isInstanceOf(Class<?> type)
public List<RawConstructor> getConstructors()
public String getSignature()
public String getErasedSignature()
public String getFullDescription()
public String getBriefDescription()
public abstract StringBuilder appendBriefDescription(StringBuilder sb)
public abstract StringBuilder appendFullDescription(StringBuilder sb)
public abstract StringBuilder appendSignature(StringBuilder sb)
public abstract StringBuilder appendErasedSignature(StringBuilder sb)
protected StringBuilder _appendClassSignature(StringBuilder sb)
protected StringBuilder _appendErasedClassSignature(StringBuilder sb)
protected StringBuilder _appendClassDescription(StringBuilder sb)
protected StringBuilder _appendClassName(StringBuilder sb)
protected RawField[] _getFields(boolean statics)
statics
- Whether to return static methods (true) or member methods (false)protected RawMethod[] _getMethods(boolean statics)
statics
- Whether to return static methods (true) or member methods (false)protected RawConstructor[] _getConstructors()
Copyright © 2012 fasterxml.com. All Rights Reserved.