org.codehaus.jackson.map.type
Class TypeBase

java.lang.Object
  extended by org.codehaus.jackson.type.JavaType
      extended by org.codehaus.jackson.map.type.TypeBase
Direct Known Subclasses:
ArrayType, CollectionLikeType, MapLikeType, SimpleType

public abstract class TypeBase
extends JavaType


Field Summary
 
Fields inherited from class org.codehaus.jackson.type.JavaType
_class, _hashCode, _typeHandler, _valueHandler
 
Constructor Summary
protected TypeBase(Class<?> raw, int hash)
           
 
Method Summary
protected static StringBuilder _classSignature(Class<?> cls, StringBuilder sb, boolean trailingSemicolon)
           
protected abstract  String buildCanonicalName()
           
protected  JavaType copyHandlers(JavaType fromType)
           
abstract  StringBuilder getErasedSignature(StringBuilder sb)
          Method for accessing signature without generic type information, in form compatible with all versions of JVM, and specifically used for type descriptions when generating byte code.
abstract  StringBuilder getGenericSignature(StringBuilder sb)
           
 String toCanonical()
          Method that can be used to serialize type into form from which it can be fully deserialized from at a later point (using TypeFactory from mapper package).
 
Methods inherited from class org.codehaus.jackson.type.JavaType
_assertSubclass, _narrow, _widen, containedType, containedTypeCount, containedTypeName, equals, forcedNarrowBy, getContentType, getErasedSignature, getGenericSignature, getKeyType, getRawClass, getTypeHandler, getValueHandler, hasGenericTypes, hashCode, hasRawClass, isAbstract, isArrayType, isCollectionLikeType, isConcrete, isContainerType, isEnumType, isFinal, isInterface, isMapLikeType, isPrimitive, isThrowable, narrowBy, narrowContentsBy, setTypeHandler, setValueHandler, toString, widenBy, widenContentsBy, withContentTypeHandler, withTypeHandler
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeBase

protected TypeBase(Class<?> raw,
                   int hash)
Method Detail

toCanonical

public String toCanonical()
Description copied from class: JavaType
Method that can be used to serialize type into form from which it can be fully deserialized from at a later point (using TypeFactory from mapper package). For simple types this is same as calling Class.getName(), but for structured types it may additionally contain type information about contents.

Specified by:
toCanonical in class JavaType

buildCanonicalName

protected abstract String buildCanonicalName()

copyHandlers

protected final JavaType copyHandlers(JavaType fromType)

getGenericSignature

public abstract StringBuilder getGenericSignature(StringBuilder sb)
Specified by:
getGenericSignature in class JavaType
Parameters:
sb - StringBuilder to append signature to
Returns:
StringBuilder that was passed in; returned to allow call chaining

getErasedSignature

public abstract StringBuilder getErasedSignature(StringBuilder sb)
Description copied from class: JavaType
Method for accessing signature without generic type information, in form compatible with all versions of JVM, and specifically used for type descriptions when generating byte code.

Specified by:
getErasedSignature in class JavaType
Parameters:
sb - StringBuilder to append signature to
Returns:
StringBuilder that was passed in; returned to allow call chaining

_classSignature

protected static StringBuilder _classSignature(Class<?> cls,
                                               StringBuilder sb,
                                               boolean trailingSemicolon)
Parameters:
trailingSemicolon - Whether to add trailing semicolon for non-primitive (reference) types or not