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 boolean | equals(Object o)
Overrides tools. Indicates whether some other object is "equal to" this one. |
| public JavaType | |
| public JavaType | getContentType()
Overrides tools. 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) |
| public StringBuilder | getErasedSignature(StringBuilder sb)
Overrides tools. 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. |
| public StringBuilder | |
| public JavaType | getReferencedType()
Overrides tools. Method for accessing type of value that instances of this type references, if any. |
| public boolean | hasContentType()
Overrides tools. Accessor that allows determining whether |
| public boolean | isAnchorType()
Convenience accessor that allows checking whether this is the anchor type
itself; if not, it must be one of supertypes that is also a |
| public boolean | isReferenceType()
Overrides tools. Whether this type is a referential type, meaning that values are basically pointers to "real" values (or null) and not regular values themselves. |
| public JavaType | refine(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces)
Overrides tools. 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. |
| public String | toString()
Overrides tools. Returns a string representation of the object. |
| 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 tools. 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. |
| public ReferenceType | withContentTypeHandler(Object h)
Overrides tools. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. |
| public ReferenceType | withContentValueHandler(Object h)
Overrides tools. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. |
| public ReferenceType | withStaticTyping()
Overrides tools. 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. |
| public ReferenceType | withTypeHandler(Object h)
Overrides tools. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. |
| public ReferenceType | withValueHandler(Object h)
Overrides tools. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. |
| _anchorType | back to summary |
|---|---|
| protected final JavaType _anchorType 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 tools. | |
| 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 tools.
| |
| construct | back to summary |
|---|---|
| public static ReferenceType construct(Class<?> cls, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType refType) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides tools. 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() | |
| getContentType | back to summary |
|---|---|
| public JavaType getContentType() Overrides tools. Doc from tools. 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 tools. Doc from tools. 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 tools.
| |
| getReferencedType | back to summary |
|---|---|
| public JavaType getReferencedType() Overrides tools. Doc from tools. Method for accessing type of value that instances of this type references, if any.
| |
| hasContentType | back to summary |
|---|---|
| public boolean hasContentType() Overrides tools. Doc from tools. Accessor that allows determining whether
| |
| isAnchorType | back to summary |
|---|---|
| public boolean isAnchorType() 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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.
| |