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().
| Modifier and Type | Field and Description |
|---|---|
| protected final JavaType | _anchorType
Essential type used for type ids, for example if type id is needed for referencing type with polymorphic handling. |
| protected final JavaType | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | ReferenceType(Class<?> cls, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType refType, JavaType anchorType, Object valueHandler, Object typeHandler, boolean asStatic)
|
| protected | ReferenceType(TypeBase base, JavaType refType)
Constructor used when upgrading into this type (via |
| Modifier and Type | Method and Description |
|---|---|
| protected String | |
| public static ReferenceType | |
| public static ReferenceType | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides com. |
| public JavaType | |
| public JavaType | getContentType()
Overrides com. |
| public StringBuilder | getErasedSignature(StringBuilder
StringBuilder to append signature to sb)Overrides com. |
| public StringBuilder | getGenericSignature(StringBuilder
StringBuilder to append signature to sb)Overrides com. |
| public JavaType | getReferencedType()
Overrides com. |
| public boolean | hasContentType()
Overrides com. getContentType() should
return a non-null value (that is, there is a "content type") or not.
|
| public boolean | isAnchorType()
Deprecated
Since 2.16
Convenience accessor that allows checking whether this is the anchor type
itself; if not, it must be one of supertypes that is also a ReferenceType
|
| public boolean | isReferenceType()
Overrides com. |
| public JavaType | refine(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces)
Overrides com. |
| public String | toString()
Overrides com. |
| public static ReferenceType | upgradeFrom(JavaType
Resolved non-reference type (usually baseType, JavaType SimpleType) that is being upgradedReferenced type; usually the first and only type parameter, but not necessarily refdType)Factory method that can be used to "upgrade" a basic type into collection-like
one; usually done via |
| public JavaType | withContentType(JavaType contentType)
Overrides com. |
| public ReferenceType | withContentTypeHandler(Object
Handler to pass to new instance created h)Overrides com. |
| public ReferenceType | withContentValueHandler(Object
Handler to pass to new instance created h)Overrides com. |
| public ReferenceType | withStaticTyping()
Overrides com. |
| public ReferenceType | withTypeHandler(Object
Handler to pass to new instance created h)Overrides com. |
| public ReferenceType | withValueHandler(Object
Handler to pass to new instance created h)Overrides com. |
| _anchorType | back to summary |
|---|---|
| protected final JavaType _anchorType
Deprecated Since 2.16 Essential type used for type ids, for example if type id is needed for
referencing type with polymorphic handling. Typically initialized when
a
| |
| _referencedType | back to summary |
|---|---|
| protected final JavaType _referencedType | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| ReferenceType | back to summary |
|---|---|
| protected ReferenceType(Class<?> cls, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType refType, JavaType anchorType, Object valueHandler, Object typeHandler, boolean asStatic) | |
| ReferenceType | back to summary |
|---|---|
| protected ReferenceType(TypeBase base, JavaType refType) Constructor used when upgrading into this type (via
| |
| buildCanonicalName | back to summary |
|---|---|
| protected String buildCanonicalName() Overrides com.
| |
| construct | back to summary |
|---|---|
public static ReferenceType construct(Class<?> cls, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType refType)
| |
| construct | back to summary |
|---|---|
| public static ReferenceType construct(Class<?> cls, JavaType refType)
Deprecated
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides com. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getAnchorType | back to summary |
|---|---|
| public JavaType getAnchorType()
Deprecated Since 2.16
| |
| getContentType | back to summary |
|---|---|
| public JavaType getContentType() Overrides com. Doc from com. 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) | |
| getErasedSignature | back to summary |
|---|---|
| public StringBuilder getErasedSignature(StringBuilder sb) Overrides com. Doc from com. 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.
| |
| getGenericSignature | back to summary |
|---|---|
| public StringBuilder getGenericSignature(StringBuilder sb) Overrides com.
| |
| getReferencedType | back to summary |
|---|---|
| public JavaType getReferencedType() Overrides com. Doc from com. Method for accessing type of value that instances of this type references, if any. | |
| hasContentType | back to summary |
|---|---|
| public boolean hasContentType() Overrides com. Doc from com. Accessor that allows determining whether
| |
| isAnchorType | back to summary |
|---|---|
| public boolean isAnchorType()
Deprecated Since 2.16 Convenience accessor that allows checking whether this is the anchor type
itself; if not, it must be one of supertypes that is also a
| |
| isReferenceType | back to summary |
|---|---|
| public boolean isReferenceType() Overrides com. Doc from com. Whether this type is a referential type, meaning that values are
basically pointers to "real" values (or null) and not regular
values themselves. Typical examples include things like
| |
| refine | back to summary |
|---|---|
| public JavaType refine(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces) Overrides com. Doc from com. 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.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Doc from java. Returns a string representation of the object. | |
| upgradeFrom | back to summary |
|---|---|
| public static ReferenceType upgradeFrom(JavaType baseType, JavaType refdType) Factory method that can be used to "upgrade" a basic type into collection-like
one; usually done via
| |
| withContentType | back to summary |
|---|---|
| public JavaType withContentType(JavaType contentType) Overrides com. Doc from com. 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. If content type is already set to given type, | |
| withContentTypeHandler | back to summary |
|---|---|
| public ReferenceType withContentTypeHandler(Object h) Overrides com. Doc from com. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. May be removed from Jackson 3.0. This mutant factory method 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.
| |
| withContentValueHandler | back to summary |
|---|---|
| public ReferenceType withContentValueHandler(Object h) Overrides com. Doc from com. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. May be removed from Jackson 3.0. 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.
| |
| withStaticTyping | back to summary |
|---|---|
| public ReferenceType withStaticTyping() Overrides com. Doc from com. 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. The main use case is to allow forcing of specific root value serialization type, and specifically in resolving serializers for contained types (element types for arrays, Collections and Maps).
| |
| withTypeHandler | back to summary |
|---|---|
| public ReferenceType withTypeHandler(Object h) Overrides com. Doc from com. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. May be removed from Jackson 3.0. This mutant factory method will construct a new instance that is identical to this instance, except that it will have specified type handler assigned.
| |
| withValueHandler | back to summary |
|---|---|
| public ReferenceType withValueHandler(Object h) Overrides com. Doc from com. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. May be removed from Jackson 3.0. This mutant factory method will construct a new instance that is identical to this instance, except that it will have specified value handler assigned.
| |