public abstract class ResolvedType extends Object
JavaType
from "databind" bundle -- this
abstraction is only needed so that types can be passed through
JsonParser.readValueAs(java.lang.Class<T>)
methods.Constructor and Description |
---|
ResolvedType() |
Modifier and Type | Method and Description |
---|---|
abstract ResolvedType |
containedType(int index)
Method for accessing definitions of contained ("child")
types.
|
abstract int |
containedTypeCount()
Method for checking how many contained types this type
has.
|
abstract String |
containedTypeName(int index)
Method for accessing name of type variable in indicated
position.
|
abstract ResolvedType |
getContentType()
Method for accessing content type of this type, if type has
such a thing: simple types do not, structured types do
(like arrays, Collections and Maps)
|
abstract ResolvedType |
getKeyType()
Method for accessing key type for this type, assuming type
has such a concept (only Map types do)
|
Class<?> |
getParameterSource()
Deprecated.
Since 2.7: does not have meaning as parameters depend on type
resolved.
|
abstract Class<?> |
getRawClass() |
abstract ResolvedType |
getReferencedType()
Method for accessing type of value that instances of this
type references, if any.
|
abstract boolean |
hasGenericTypes()
Method that can be used to find out if the type directly declares generic
parameters (for its direct super-class and/or super-interfaces).
|
abstract boolean |
hasRawClass(Class<?> clz) |
abstract boolean |
isAbstract() |
abstract boolean |
isArrayType() |
abstract boolean |
isCollectionLikeType() |
abstract boolean |
isConcrete() |
abstract boolean |
isContainerType() |
abstract boolean |
isEnumType() |
abstract boolean |
isFinal() |
abstract boolean |
isInterface() |
abstract boolean |
isMapLikeType() |
abstract boolean |
isPrimitive() |
boolean |
isReferenceType()
Whether this type is a referential type, meaning that values are
basically pointers to "real" values (or null) and not regular
values themselves.
|
abstract boolean |
isThrowable() |
abstract String |
toCanonical()
Method that can be used to serialize type into form from which
it can be fully deserialized from at a later point (using
TypeFactory from mapper package). |
public abstract boolean hasRawClass(Class<?> clz)
public abstract boolean isAbstract()
public abstract boolean isConcrete()
public abstract boolean isThrowable()
public abstract boolean isArrayType()
public abstract boolean isEnumType()
public abstract boolean isInterface()
public abstract boolean isPrimitive()
public abstract boolean isFinal()
public abstract boolean isContainerType()
public abstract boolean isCollectionLikeType()
public boolean isReferenceType()
AtomicReference
, and various
Optional
types (in JDK8, Guava).True
if this is a "referential" type, false
if notpublic abstract boolean isMapLikeType()
public abstract boolean hasGenericTypes()
True
if this type has generic type parameters, false
if not@Deprecated public Class<?> getParameterSource()
public abstract ResolvedType getKeyType()
null
if nonepublic abstract ResolvedType getContentType()
null
if nonepublic abstract ResolvedType getReferencedType()
null
if not.public abstract int containedTypeCount()
public abstract ResolvedType containedType(int index)
index
- Index of contained type to returnpublic abstract String containedTypeName(int index)
index
- Index of contained type to returnpublic abstract String toCanonical()
TypeFactory
from mapper package).
For simple types this is same as calling
Class.getName()
, but for structured types it may additionally
contain type information about contents.Copyright © 2008–2021 FasterXML. All rights reserved.