org.codehaus.jackson.map.type
Class SimpleType

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

public final class SimpleType
extends JavaType

Simple types are defined as anything other than one of recognized container types (arrays, Collections, Maps). For our needs we need not know anything further, since we have no way of dealing with generic types other than Collections and Maps.


Field Summary
protected  LinkedHashMap<String,JavaType> _typeParameters
          For generic types we need to keep track of mapping from formal into actual types, to be able to resolve generic signatures.
 
Fields inherited from class org.codehaus.jackson.type.JavaType
_class, _hashCode
 
Constructor Summary
protected SimpleType(Class<?> cls, Map<String,JavaType> typeParams)
           
 
Method Summary
protected  JavaType _narrow(Class<?> subclass)
           
static SimpleType construct(Class<?> cls, Map<String,JavaType> typeParams)
           
 boolean equals(Object o)
           
 JavaType findVariableType(String name)
          Method that can be called to see if this type has generic type binding information for type variables, for given formal type parameter name.
 boolean isContainerType()
           
 JavaType narrowContentsBy(Class<?> subclass)
           
 String toString()
           
 
Methods inherited from class org.codehaus.jackson.type.JavaType
_assertSubclass, _widen, getContentType, getHandler, getKeyType, getRawClass, hashCode, hasRawClass, isAbstract, isArrayType, isConcrete, isEnumType, isInterface, isPrimitive, isThrowable, narrowBy, setHandler, widenBy
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_typeParameters

protected final LinkedHashMap<String,JavaType> _typeParameters
For generic types we need to keep track of mapping from formal into actual types, to be able to resolve generic signatures.

Constructor Detail

SimpleType

protected SimpleType(Class<?> cls,
                     Map<String,JavaType> typeParams)
Method Detail

_narrow

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

narrowContentsBy

public JavaType narrowContentsBy(Class<?> subclass)
Specified by:
narrowContentsBy in class JavaType

construct

public static SimpleType construct(Class<?> cls,
                                   Map<String,JavaType> typeParams)

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.

findVariableType

public JavaType findVariableType(String name)
Description copied from class: JavaType
Method that can be called to see if this type has generic type binding information for type variables, for given formal type parameter name.

Overrides:
findVariableType in class JavaType
Returns:
Type given formal type parameter name maps to, if any; null if this type knows of no binding for name

toString

public String toString()
Specified by:
toString in class JavaType

equals

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