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 JavaType.getContentType()
.JsonSerializable.Base
Modifier and Type | Field and Description |
---|---|
protected JavaType |
_referencedType |
_typeNames, _typeParameters, _typeParametersFor
_asStatic, _class, _hash, _typeHandler, _valueHandler
Modifier | Constructor and Description |
---|---|
protected |
ReferenceType(Class<?> cls,
JavaType refType,
Object valueHandler,
Object typeHandler,
boolean asStatic) |
Modifier and Type | Method and Description |
---|---|
protected JavaType |
_narrow(Class<?> subclass) |
protected String |
buildCanonicalName() |
static ReferenceType |
construct(Class<?> cls,
JavaType refType,
Object valueHandler,
Object typeHandler) |
JavaType |
containedType(int index) |
int |
containedTypeCount() |
String |
containedTypeName(int index) |
boolean |
equals(Object o) |
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) |
Class<?> |
getParameterSource() |
JavaType |
getReferencedType() |
boolean |
isReferenceType() |
String |
toString() |
ReferenceType |
withContentTypeHandler(Object h)
"Copy method" that will construct a new instance that is identical to
this instance, except that its content type will have specified
type handler assigned.
|
ReferenceType |
withContentValueHandler(Object h)
"Copy 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)
"Copy 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, narrowContentsBy, widenContentsBy
_classSignature, getTypeHandler, getValueHandler, serialize, serializeWithType, toCanonical
_assertSubclass, _widen, containedTypeOrUnknown, forcedNarrowBy, getContentType, getErasedSignature, getGenericSignature, getKeyType, getRawClass, hasGenericTypes, hashCode, hasRawClass, hasValueHandler, isAbstract, isArrayType, isCollectionLikeType, isConcrete, isEnumType, isFinal, isInterface, isJavaLangObject, isMapLikeType, isPrimitive, isThrowable, isTypeOrSubTypeOf, narrowBy, useStaticType, widenBy
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getTypeName
protected final JavaType _referencedType
public static ReferenceType construct(Class<?> cls, JavaType refType, Object valueHandler, Object typeHandler)
public ReferenceType withTypeHandler(Object h)
JavaType
withTypeHandler
in class SimpleType
public ReferenceType withContentTypeHandler(Object h)
JavaType
withContentTypeHandler
in class SimpleType
public ReferenceType withValueHandler(Object h)
JavaType
withValueHandler
in class SimpleType
public ReferenceType withContentValueHandler(Object h)
JavaType
withContentValueHandler
in class SimpleType
public ReferenceType withStaticTyping()
JavaType
withStaticTyping
in class SimpleType
protected String buildCanonicalName()
buildCanonicalName
in class SimpleType
protected JavaType _narrow(Class<?> subclass)
_narrow
in class SimpleType
public JavaType getReferencedType()
getReferencedType
in class JavaType
public boolean isReferenceType()
isReferenceType
in class com.fasterxml.jackson.core.type.ResolvedType
public int containedTypeCount()
containedTypeCount
in class SimpleType
public JavaType containedType(int index)
containedType
in class SimpleType
public String containedTypeName(int index)
containedTypeName
in class SimpleType
public Class<?> getParameterSource()
getParameterSource
in class SimpleType
public StringBuilder getErasedSignature(StringBuilder sb)
JavaType
getErasedSignature
in class SimpleType
sb
- StringBuilder to append signature topublic StringBuilder getGenericSignature(StringBuilder sb)
getGenericSignature
in class SimpleType
sb
- StringBuilder to append signature topublic String toString()
toString
in class SimpleType
public boolean equals(Object o)
equals
in class SimpleType
Copyright © 2014–2015 FasterXML. All rights reserved.