org.codehaus.jackson.map.type
Class MapType

java.lang.Object
  extended by org.codehaus.jackson.type.JavaType
      extended by org.codehaus.jackson.map.type.MapType

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

untyped

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.


typed

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

_narrow

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

narrowContentsBy

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

isFullyTyped

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

isContainerType

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

narrowKey

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

getKeyType

public JavaType getKeyType()

getValueType

public JavaType getValueType()

toString

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

equals

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