Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.type

public final Class CollectionType

extends CollectionLikeType
Class Inheritance
Imports
java.lang.reflect.TypeVariable, com.fasterxml.jackson.databind.JavaType

Type that represents Java Collection types (Lists, Sets).

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from com.fasterxml.jackson.databind.type.CollectionLikeType:
_elementType

Constructor Summary

AccessConstructor and Description
private
CollectionType(Class<?> collT, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType elemT, Object valueHandler, Object typeHandler, boolean asStatic)

protected

Method Summary

Modifier and TypeMethod and Description
public static CollectionType
public static CollectionType
construct(Class<?> rawType, JavaType elemT)

Hides com.fasterxml.jackson.databind.type.CollectionLikeType.construct.

Deprecated Since 2.7, remove from 2.9

public JavaType
refine(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces)

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.refine.

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 com.fasterxml.jackson.databind.type.CollectionLikeType.toString.

Returns a string representation of the object.

public JavaType
withContentType(JavaType contentType)

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.withContentType.

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 CollectionType
withContentTypeHandler(Object
Handler to pass to new instance created
h
)

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.withContentTypeHandler.

Internal method that should not be used by any code outside of jackson-databind: only used internally by databind.

public CollectionType
withContentValueHandler(Object
Handler to pass to new instance created
h
)

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.withContentValueHandler.

Internal method that should not be used by any code outside of jackson-databind: only used internally by databind.

public CollectionType
withStaticTyping()

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.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.

public CollectionType
withTypeHandler(Object
Handler to pass to new instance created
h
)

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.withTypeHandler.

Internal method that should not be used by any code outside of jackson-databind: only used internally by databind.

public CollectionType
withValueHandler(Object
Handler to pass to new instance created
h
)

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.withValueHandler.

Internal method that should not be used by any code outside of jackson-databind: only used internally by databind.

Inherited from com.fasterxml.jackson.databind.type.CollectionLikeType:
buildCanonicalNameequalsgetContentTypegetContentTypeHandlergetContentValueHandlergetErasedSignaturegetGenericSignaturehasHandlersisCollectionLikeTypeisContainerTypeisTrueCollectionTypeupgradeFromwithHandlersFrom

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.type.CollectionLikeType.serialVersionUID.

Constructor Detail

CollectionTypeback to summary
private CollectionType(Class<?> collT, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType elemT, Object valueHandler, Object typeHandler, boolean asStatic)
CollectionTypeback to summary
protected CollectionType(TypeBase base, JavaType elemT)
Since
2.7

Method Detail

constructback to summary
public static CollectionType construct(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType elemT)

Hides com.fasterxml.jackson.databind.type.CollectionLikeType.construct.

Since
2.7
constructback to summary
public static CollectionType construct(Class<?> rawType, JavaType elemT)

Hides com.fasterxml.jackson.databind.type.CollectionLikeType.construct.

Deprecated

Since 2.7, remove from 2.9

Annotations
@Deprecated
refineback to summary
public JavaType refine(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces)

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.refine.

Doc from com.fasterxml.jackson.databind.JavaType.refine.

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.

Annotations
@Override
toStringback to summary
public String toString()

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
withContentTypeback to summary
public JavaType withContentType(JavaType contentType)

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.withContentType.

Doc from com.fasterxml.jackson.databind.JavaType.withContentType.

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, this is returned. If type does not have a content type (which is the case with SimpleType), IllegalArgumentException will be thrown.

Returns:JavaType

Newly created type instance

Annotations
@Override
withContentTypeHandlerback to summary
public CollectionType withContentTypeHandler(Object h)

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.withContentTypeHandler.

Doc from com.fasterxml.jackson.databind.JavaType.withContentTypeHandler.

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.

Parameters
h:Object

Handler to pass to new instance created

Returns:CollectionType

Newly created type instance with same type information, specified handler

Annotations
@Override
withContentValueHandlerback to summary
public CollectionType withContentValueHandler(Object h)

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.withContentValueHandler.

Doc from com.fasterxml.jackson.databind.JavaType.withContentValueHandler.

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.

Parameters
h:Object

Handler to pass to new instance created

Returns:CollectionType

Newly created type instance with same type information, specified handler

Annotations
@Override
withStaticTypingback to summary
public CollectionType withStaticTyping()

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.withStaticTyping.

Doc from com.fasterxml.jackson.databind.JavaType.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. 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).

Annotations
@Override
withTypeHandlerback to summary
public CollectionType withTypeHandler(Object h)

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.withTypeHandler.

Doc from com.fasterxml.jackson.databind.JavaType.withTypeHandler.

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.

Parameters
h:Object

Handler to pass to new instance created

Returns:CollectionType

Newly created type instance with same type information, specified handler

Annotations
@Override
withValueHandlerback to summary
public CollectionType withValueHandler(Object h)

Overrides com.fasterxml.jackson.databind.type.CollectionLikeType.withValueHandler.

Doc from com.fasterxml.jackson.databind.JavaType.withValueHandler.

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.

Parameters
h:Object

Handler to pass to new instance created

Returns:CollectionType

Newly created type instance with same type information, specified handler

Annotations
@Override