public class ReferenceType extends SimpleType
SimpleType for types that are referential types,
that is, values that can be dereferenced to another value (or null),
of different type.
Referenced type is accessible using getContentType().JsonSerializable.Base| Modifier and Type | Field and Description |
|---|---|
protected JavaType |
_referencedType |
_bindings, _superClass, _superInterfaces_asStatic, _class, _hash, _typeHandler, _valueHandler| Modifier | Constructor and Description |
|---|---|
protected |
ReferenceType(Class<?> cls,
TypeBindings bindings,
JavaType superClass,
JavaType[] superInts,
JavaType refType,
Object valueHandler,
Object typeHandler,
boolean asStatic) |
protected |
ReferenceType(TypeBase base,
JavaType refType) |
| Modifier and Type | Method and Description |
|---|---|
protected JavaType |
_narrow(Class<?> subclass) |
protected String |
buildCanonicalName() |
static ReferenceType |
construct(Class<?> cls,
JavaType refType)
Deprecated.
|
static ReferenceType |
construct(Class<?> cls,
TypeBindings bindings,
JavaType superClass,
JavaType[] superInts,
JavaType refType) |
boolean |
equals(Object o) |
JavaType |
getContentType() |
StringBuilder |
getErasedSignature(StringBuilder sb)
Method for accessing signature without generic
type information, in form compatible with all versions
of JVM, and specifically used for type descriptions
when generating byte code.
|
StringBuilder |
getGenericSignature(StringBuilder sb) |
JavaType |
getReferencedType() |
boolean |
isReferenceType() |
JavaType |
refine(Class<?> rawType,
TypeBindings bindings,
JavaType superClass,
JavaType[] superInterfaces)
Mutant factory method that will try to create and return a sub-type instance
for known parameterized types; for other types will return `null` to indicate
that no just refinement makes necessary sense, without trying to detect
special status through implemented interfaces.
|
String |
toString() |
static ReferenceType |
upgradeFrom(JavaType baseType,
JavaType refType)
Factory method that can be used to "upgrade" a basic type into collection-like
one; usually done via
TypeModifier |
JavaType |
withContentType(JavaType contentType)
Mutant factory method that may be called on structured types
that have a so-called content type (element of arrays, value type
of Maps, referenced type of referential types),
and will construct a new instance that is identical to
this instance, except that it has specified content type, instead of current
one.
|
ReferenceType |
withContentTypeHandler(Object h)
Mutant factory method that will construct a new instance that is identical to
this instance, except that it will have specified content type (element type
for arrays, value type for Maps and so forth) handler assigned.
|
ReferenceType |
withContentValueHandler(Object h)
Mutant factory method that will construct a new instance that is identical to
this instance, except that it will have specified content value handler assigned.
|
ReferenceType |
withStaticTyping()
Method that can be called to get a type instance that indicates
that values of the type should be handled using "static typing" for purposes
of serialization (as opposed to "dynamic" aka runtime typing):
meaning that no runtime information is needed for determining serializers to use.
|
ReferenceType |
withTypeHandler(Object h)
"Copy method" that will construct a new instance that is identical to
this instance, except that it will have specified type handler assigned.
|
ReferenceType |
withValueHandler(Object h)
Mutant factory method that will construct a new instance that is identical to
this instance, except that it will have specified value handler assigned.
|
construct, constructUnsafe, isContainerType_classSignature, containedType, containedTypeCount, containedTypeName, findSuperType, findTypeParameters, getBindings, getInterfaces, getSuperClass, getTypeHandler, getValueHandler, serialize, serializeWithType, toCanonicalcontainedTypeOrUnknown, forcedNarrowBy, getContentTypeHandler, getContentValueHandler, getErasedSignature, getGenericSignature, getKeyType, getParameterSource, getRawClass, hasGenericTypes, hashCode, hasRawClass, hasValueHandler, isAbstract, isArrayType, isCollectionLikeType, isConcrete, isEnumType, isFinal, isInterface, isJavaLangObject, isMapLikeType, isPrimitive, isThrowable, isTypeOrSubTypeOf, useStaticTypeprotected final JavaType _referencedType
protected ReferenceType(Class<?> cls, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType refType, Object valueHandler, Object typeHandler, boolean asStatic)
public static ReferenceType upgradeFrom(JavaType baseType, JavaType refType)
TypeModifierpublic static ReferenceType construct(Class<?> cls, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType refType)
@Deprecated public static ReferenceType construct(Class<?> cls, JavaType refType)
public JavaType withContentType(JavaType contentType)
JavaTypethis is returned.
If type does not have a content type (which is the case with
SimpleType), IllegalArgumentException
will be thrown.withContentType in class SimpleTypepublic ReferenceType withTypeHandler(Object h)
JavaTypewithTypeHandler in class SimpleTypepublic ReferenceType withContentTypeHandler(Object h)
JavaTypewithContentTypeHandler in class SimpleTypepublic ReferenceType withValueHandler(Object h)
JavaTypewithValueHandler in class SimpleTypepublic ReferenceType withContentValueHandler(Object h)
JavaTypewithContentValueHandler in class SimpleTypepublic ReferenceType withStaticTyping()
JavaTypewithStaticTyping in class SimpleTypepublic JavaType refine(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces)
JavaTyperefine in class SimpleTypeprotected String buildCanonicalName()
buildCanonicalName in class SimpleTypeprotected JavaType _narrow(Class<?> subclass)
_narrow in class SimpleTypepublic JavaType getContentType()
getContentType in class JavaTypepublic JavaType getReferencedType()
getReferencedType in class JavaTypepublic boolean isReferenceType()
isReferenceType in class ResolvedTypepublic StringBuilder getErasedSignature(StringBuilder sb)
JavaTypegetErasedSignature in class SimpleTypesb - StringBuilder to append signature topublic StringBuilder getGenericSignature(StringBuilder sb)
getGenericSignature in class SimpleTypesb - StringBuilder to append signature topublic String toString()
toString in class SimpleTypepublic boolean equals(Object o)
equals in class SimpleTypeCopyright © 2008–2016 FasterXML. All rights reserved.