com.fasterxml.jackson.databind.type

## Class CollectionType

- java.lang.Object
- - com.fasterxml.jackson.core.type.ResolvedType
  - - com.fasterxml.jackson.databind.JavaType
    - - com.fasterxml.jackson.databind.type.TypeBase
      - - com.fasterxml.jackson.databind.type.CollectionLikeType
        - - com.fasterxml.jackson.databind.type.CollectionType

All Implemented Interfaces:
  JsonSerializable, Serializable, Type

    public final class CollectionType
    extends CollectionLikeType

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

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class com.fasterxml.jackson.databind.type.CollectionLikeType

`_elementType`

### Fields inherited from class com.fasterxml.jackson.databind.JavaType

`_asStatic, _class, _hash, _typeHandler, _valueHandler`

### Method Summary

Methods
`protected JavaType` `_narrow(Class<?> subclass)`
`static CollectionType` `construct(Class<?> rawType, JavaType elemT)`
`Class<?>` `getParameterSource()`
`JavaType` `narrowContentsBy(Class<?> contentClass)`
`String` `toString()`
`JavaType` `widenContentsBy(Class<?> contentClass)`
`CollectionType` `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.
`CollectionType` `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.
`CollectionType` `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.
`CollectionType` `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.
`CollectionType` `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.

### Methods inherited from class com.fasterxml.jackson.databind.type.CollectionLikeType

`buildCanonicalName, containedType, containedTypeCount, containedTypeName, equals, getContentType, getErasedSignature, getGenericSignature, isCollectionLikeType, isContainerType, isTrueCollectionType`

### Methods inherited from class com.fasterxml.jackson.databind.type.TypeBase

`_classSignature, getTypeHandler, getValueHandler, serialize, serializeWithType, toCanonical`

### Methods inherited from class com.fasterxml.jackson.databind.JavaType

`_assertSubclass, _widen, containedTypeOrUnknown, forcedNarrowBy, getErasedSignature, getGenericSignature, getKeyType, getRawClass, hasGenericTypes, hashCode, hasRawClass, isAbstract, isArrayType, isConcrete, isEnumType, isFinal, isInterface, isMapLikeType, isPrimitive, isThrowable, narrowBy, useStaticType, widenBy`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Method Detail

#### _narrow

    protected JavaType _narrow(Class<?> subclass)

Overrides:
  `_narrow` in class `CollectionLikeType`

#### narrowContentsBy

    public JavaType narrowContentsBy(Class<?> contentClass)

Overrides:
  `narrowContentsBy` in class `CollectionLikeType`

#### widenContentsBy

    public JavaType widenContentsBy(Class<?> contentClass)

Overrides:
  `widenContentsBy` in class `CollectionLikeType`

#### construct

    public static CollectionType construct(Class<?> rawType,
                           JavaType elemT)

#### withTypeHandler

    public CollectionType withTypeHandler(Object h)

Description copied from class: `JavaType`
"Copy method" that will construct a new instance that is identical to this instance, except that it will have specified type handler assigned.

Overrides:
  `withTypeHandler` in class `CollectionLikeType`
Returns:
  Newly created type instance

#### withContentTypeHandler

    public CollectionType withContentTypeHandler(Object h)

Description copied from class: `JavaType`
"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.

Overrides:
  `withContentTypeHandler` in class `CollectionLikeType`
Returns:
  Newly created type instance

#### withValueHandler

    public CollectionType withValueHandler(Object h)

Description copied from class: `JavaType`
"Copy method" that will construct a new instance that is identical to this instance, except that it will have specified value handler assigned.

Overrides:
  `withValueHandler` in class `CollectionLikeType`
Returns:
  Newly created type instance

#### withContentValueHandler

    public CollectionType withContentValueHandler(Object h)

Description copied from class: `JavaType`
"Copy method" that will construct a new instance that is identical to this instance, except that it will have specified content value handler assigned.

Overrides:
  `withContentValueHandler` in class `CollectionLikeType`
Returns:
  Newly created type instance

#### withStaticTyping

    public CollectionType withStaticTyping()

Description copied from class: `JavaType`
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).

Overrides:
  `withStaticTyping` in class `CollectionLikeType`

#### getParameterSource

    public Class<?> getParameterSource()

Overrides:
  `getParameterSource` in class `CollectionLikeType`

#### toString

    public String toString()

Overrides:
  `toString` in class `CollectionLikeType`