org.codehaus.jackson.map.type
Class SimpleType
java.lang.Object
org.codehaus.jackson.type.JavaType
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.
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 |
_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.
SimpleType
protected SimpleType(Class<?> cls,
Map<String,JavaType> typeParams)
_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