java.util.Collection ;
but may or may not be instances of that interface.
This specifically allows framework to check for configuration and annotation
settings used for Map types, and pass these to custom handlers that may be more
familiar with actual type.
| Modifier and Type | Field and Description |
|---|---|
| protected final JavaType | _elementType
Type of elements in collection |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | CollectionLikeType(Class<?> collT, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType elemT, Object valueHandler, Object typeHandler, boolean asStatic)
|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected String | |
| public static CollectionLikeType | |
| public static CollectionLikeType | construct(Class<?> rawType, JavaType elemT)
Deprecated
Since 2.7, use
upgradeFrom for constructing instances, given
pre-resolved SimpleType.
|
| public boolean | equals(Object
the reference object with which to compare. o)Implements abstract com. Indicates whether some other object is "equal to" this one. |
| public JavaType | getContentType()
Overrides 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) |
| public Object | getContentTypeHandler()
Overrides com. Internal accessor that should not be used by any code outside of jackson-databind: only used internally by databind. |
| public Object | getContentValueHandler()
Overrides com. Internal accessor that should not be used by any code outside of jackson-databind: only used internally by databind. |
| public StringBuilder | getErasedSignature(StringBuilder
StringBuilder to append signature to sb)Implements abstract 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. |
| public StringBuilder | getGenericSignature(StringBuilder
StringBuilder to append signature to sb)Implements abstract com.
|
| public boolean | hasHandlers()
Overrides com. Helper method that checks whether this type, or its (optional) key
or content type has |
| public boolean | |
| public boolean | |
| public boolean | isTrueCollectionType()
Deprecated
Since 2.12 just use instanceof
Method that can be used for checking whether this type is a
"real" Collection type; meaning whether it represents a parameterized
subtype of |
| public JavaType | refine(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces)
Implements abstract 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. |
| public String | toString()
Implements abstract com. Returns a string representation of the object. |
| public static CollectionLikeType | upgradeFrom(JavaType baseType, JavaType elementType)
Factory method that can be used to "upgrade" a basic type into collection-like
one; usually done via |
| public JavaType | withContentType(JavaType contentType)
Implements abstract 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. |
| public CollectionLikeType | withContentTypeHandler(Object
Handler to pass to new instance created h)Implements abstract com. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. |
| public CollectionLikeType | withContentValueHandler(Object
Handler to pass to new instance created h)Implements abstract com. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. |
| public JavaType | withHandlersFrom(JavaType src)
Overrides com. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. |
| public CollectionLikeType | withStaticTyping()
Implements abstract 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. |
| public CollectionLikeType | withTypeHandler(Object
Handler to pass to new instance created h)Implements abstract com. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. |
| public CollectionLikeType | withValueHandler(Object
Handler to pass to new instance created h)Implements abstract com. Internal method that should not be used by any code outside of jackson-databind: only used internally by databind. |
| _elementType | back to summary |
|---|---|
| protected final JavaType _elementType Type of elements in collection | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| CollectionLikeType | back to summary |
|---|---|
| protected CollectionLikeType(Class<?> collT, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType elemT, Object valueHandler, Object typeHandler, boolean asStatic) | |
| CollectionLikeType | back to summary |
|---|---|
protected CollectionLikeType(TypeBase base, JavaType elemT)
| |
| buildCanonicalName | back to summary |
|---|---|
| protected String buildCanonicalName() Overrides com.
| |
| construct | back to summary |
|---|---|
public static CollectionLikeType construct(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType elemT)
| |
| construct | back to summary |
|---|---|
| public static CollectionLikeType construct(Class<?> rawType, JavaType elemT)
Deprecated Since 2.7, use
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Implements abstract 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. | |
| 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) | |
| getContentTypeHandler | back to summary |
|---|---|
| public Object getContentTypeHandler() Overrides com. Doc from com. Internal accessor that should not be used by any code outside of jackson-databind: only used internally by databind. May be removed from Jackson 3.0. | |
| getContentValueHandler | back to summary |
|---|---|
| public Object getContentValueHandler() Overrides com. Doc from com. Internal accessor that should not be used by any code outside of jackson-databind: only used internally by databind. May be removed from Jackson 3.0. | |
| getErasedSignature | back to summary |
|---|---|
| public StringBuilder getErasedSignature(StringBuilder sb) Implements abstract 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) Implements abstract com.
| |
| hasHandlers | back to summary |
|---|---|
| public boolean hasHandlers() Overrides com. Doc from com. Helper method that checks whether this type, or its (optional) key
or content type has
| |
| isCollectionLikeType | back to summary |
|---|---|
| public boolean isCollectionLikeType() Overrides com.
| |
| isContainerType | back to summary |
|---|---|
| public boolean isContainerType() Implements abstract com.
| |
| isTrueCollectionType | back to summary |
|---|---|
| public boolean isTrueCollectionType()
Deprecated Since 2.12 just use instanceof Method that can be used for checking whether this type is a
"real" Collection type; meaning whether it represents a parameterized
subtype of
| |
| refine | back to summary |
|---|---|
| public JavaType refine(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces) Implements abstract 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() Implements abstract com. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| upgradeFrom | back to summary |
|---|---|
| public static CollectionLikeType upgradeFrom(JavaType baseType, JavaType elementType) 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) Implements abstract 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 CollectionLikeType withContentTypeHandler(Object h) Implements abstract 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 CollectionLikeType withContentValueHandler(Object h) Implements abstract 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.
| |
| withHandlersFrom | back to summary |
|---|---|
| public JavaType withHandlersFrom(JavaType src) 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 try to copy handlers that the specified source type instance had, if any; this must be done recursively where necessary (as content types may be structured).
| |
| withStaticTyping | back to summary |
|---|---|
| public CollectionLikeType withStaticTyping() Implements abstract 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 CollectionLikeType withTypeHandler(Object h) Implements abstract 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 CollectionLikeType withValueHandler(Object h) Implements abstract 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.
| |