Class MapType

  extended by org.codehaus.jackson.type.JavaType
      extended by

public final class MapType
extends JavaType

Type that represents Java Map types.

Field Summary
Fields inherited from class org.codehaus.jackson.type.JavaType
_class, _hashCode
Method Summary
protected  JavaType _narrow(java.lang.Class<?> subclass)
 boolean equals(java.lang.Object o)
 JavaType getKeyType()
 JavaType getValueType()
 boolean isContainerType()
 boolean isFullyTyped()
          Method that can be used to check whether type described is fully typed, regarding the way JavaTypes are used for deserialization.
 JavaType narrowContentsBy(java.lang.Class<?> contentClass)
 JavaType narrowKey(java.lang.Class<?> keySubclass)
 java.lang.String toString()
static MapType typed(java.lang.Class<?> rawType, JavaType keyT, JavaType valueT)
static MapType untyped(java.lang.Class<?> rawType, JavaType keyT, JavaType valueT)
          Method called to construct a partially typed instance.
Methods inherited from class org.codehaus.jackson.type.JavaType
_assertSubclass, getRawClass, hashCode, hasRawClass, isAbstract, isArrayType, isEnumType, isInterface, isPrimitive, narrowBy
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail


public static MapType untyped(java.lang.Class<?> rawType,
                              JavaType keyT,
                              JavaType valueT)
Method called to construct a partially typed instance. Partial means that we can not determine component types, due to type erasure. Resulting type may or may not be acceptable to caller.


public static MapType typed(java.lang.Class<?> rawType,
                            JavaType keyT,
                            JavaType valueT)


protected JavaType _narrow(java.lang.Class<?> subclass)
Specified by:
_narrow in class JavaType


public JavaType narrowContentsBy(java.lang.Class<?> contentClass)
Specified by:
narrowContentsBy in class JavaType


public boolean isFullyTyped()
Description copied from class: JavaType
Method that can be used to check whether type described is fully typed, regarding the way JavaTypes are used for deserialization. For this to be true, all Collection and Map types must have proper element/value/key type information, and can not be plain classes.

Specified by:
isFullyTyped in class JavaType


public boolean isContainerType()
Specified by:
isContainerType in class JavaType
True if type represented is a container type; this includes array, Map and Collection types.


public JavaType narrowKey(java.lang.Class<?> keySubclass)


public JavaType getKeyType()


public JavaType getValueType()


public java.lang.String toString()
Specified by:
toString in class JavaType


public boolean equals(java.lang.Object o)
Specified by:
equals in class JavaType