Package org.codehaus.jackson.map.type
Class MapType
- java.lang.Object
-
- org.codehaus.jackson.type.JavaType
-
- org.codehaus.jackson.map.type.TypeBase
-
- org.codehaus.jackson.map.type.MapLikeType
-
- org.codehaus.jackson.map.type.MapType
-
- All Implemented Interfaces:
JsonSerializable
,JsonSerializableWithType
public final class MapType extends MapLikeType
Type that represents "true" Java Map types.
-
-
Field Summary
-
Fields inherited from class org.codehaus.jackson.map.type.MapLikeType
_keyType, _valueType
-
Fields inherited from class org.codehaus.jackson.type.JavaType
_class, _hashCode, _typeHandler, _valueHandler
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JavaType
_narrow(Class<?> subclass)
static MapType
construct(Class<?> rawType, JavaType keyT, JavaType valueT)
JavaType
narrowContentsBy(Class<?> contentClass)
JavaType
narrowKey(Class<?> keySubclass)
String
toString()
JavaType
widenContentsBy(Class<?> contentClass)
JavaType
widenKey(Class<?> keySubclass)
MapType
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.MapType
withContentValueHandler(Object h)
MapType
withKeyTypeHandler(Object h)
MapType
withKeyValueHandler(Object h)
MapType
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.MapType
withValueHandler(Object h)
-
Methods inherited from class org.codehaus.jackson.map.type.MapLikeType
buildCanonicalName, containedType, containedTypeCount, containedTypeName, equals, getContentType, getErasedSignature, getGenericSignature, getKeyType, isContainerType, isMapLikeType, isTrueMapType
-
Methods inherited from class org.codehaus.jackson.map.type.TypeBase
_classSignature, getTypeHandler, getValueHandler, serialize, serializeWithType, toCanonical
-
Methods inherited from class org.codehaus.jackson.type.JavaType
_assertSubclass, _widen, forcedNarrowBy, getErasedSignature, getGenericSignature, getRawClass, hasGenericTypes, hashCode, hasRawClass, isAbstract, isArrayType, isCollectionLikeType, isConcrete, isEnumType, isFinal, isInterface, isPrimitive, isThrowable, narrowBy, setValueHandler, widenBy
-
-
-
-
Method Detail
-
_narrow
protected JavaType _narrow(Class<?> subclass)
- Overrides:
_narrow
in classMapLikeType
-
narrowContentsBy
public JavaType narrowContentsBy(Class<?> contentClass)
- Overrides:
narrowContentsBy
in classMapLikeType
-
widenContentsBy
public JavaType widenContentsBy(Class<?> contentClass)
- Overrides:
widenContentsBy
in classMapLikeType
-
narrowKey
public JavaType narrowKey(Class<?> keySubclass)
- Overrides:
narrowKey
in classMapLikeType
-
widenKey
public JavaType widenKey(Class<?> keySubclass)
- Overrides:
widenKey
in classMapLikeType
- Since:
- 1.8
-
withTypeHandler
public MapType 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 classMapLikeType
- Returns:
- Newly created type instance
-
withContentTypeHandler
public MapType 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 classMapLikeType
- Returns:
- Newly created type instance
-
withValueHandler
public MapType withValueHandler(Object h)
- Overrides:
withValueHandler
in classMapLikeType
-
withContentValueHandler
public MapType withContentValueHandler(Object h)
- Overrides:
withContentValueHandler
in classMapLikeType
-
withKeyTypeHandler
public MapType withKeyTypeHandler(Object h)
- Overrides:
withKeyTypeHandler
in classMapLikeType
- Since:
- 1.9
-
withKeyValueHandler
public MapType withKeyValueHandler(Object h)
- Overrides:
withKeyValueHandler
in classMapLikeType
- Since:
- 1.9
-
toString
public String toString()
- Overrides:
toString
in classMapLikeType
-
-