Package org.codehaus.jackson.map.type
Class TypeBase
java.lang.Object
org.codehaus.jackson.type.JavaType
org.codehaus.jackson.map.type.TypeBase
- All Implemented Interfaces:
JsonSerializable,JsonSerializableWithType
- Direct Known Subclasses:
ArrayType,CollectionLikeType,MapLikeType,SimpleType
-
Field Summary
Fields inherited from class org.codehaus.jackson.type.JavaType
_class, _hashCode, _typeHandler, _valueHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringBuilder_classSignature(Class<?> cls, StringBuilder sb, boolean trailingSemicolon) protected abstract Stringabstract StringBuilderMethod 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<T> TMethod for accessing type handler associated with this type, if any<T> TMethod for accessing value handler associated with this type, if anyvoidserialize(JsonGenerator jgen, SerializerProvider provider) voidserializeWithType(JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) Method that can be used to serialize type into form from which it can be fully deserialized from at a later point (usingTypeFactoryfrom mapper package).Methods inherited from class org.codehaus.jackson.type.JavaType
_assertSubclass, _narrow, _widen, containedType, containedTypeCount, containedTypeName, equals, forcedNarrowBy, getContentType, getErasedSignature, getGenericSignature, getKeyType, getRawClass, hasGenericTypes, hashCode, hasRawClass, isAbstract, isArrayType, isCollectionLikeType, isConcrete, isContainerType, isEnumType, isFinal, isInterface, isMapLikeType, isPrimitive, isThrowable, narrowBy, narrowContentsBy, setValueHandler, toString, widenBy, widenContentsBy, withContentTypeHandler, withContentValueHandler, withTypeHandler, withValueHandler
-
Constructor Details
-
TypeBase
Deprecated. -
TypeBase
Main constructor to use by extending classes.- Since:
- 1.9
-
-
Method Details
-
toCanonical
Description copied from class:JavaTypeMethod that can be used to serialize type into form from which it can be fully deserialized from at a later point (usingTypeFactoryfrom mapper package). For simple types this is same as callingClass.getName(), but for structured types it may additionally contain type information about contents.- Specified by:
toCanonicalin classJavaType
-
buildCanonicalName
-
getGenericSignature
- Specified by:
getGenericSignaturein classJavaType- Parameters:
sb- StringBuilder to append signature to- Returns:
- StringBuilder that was passed in; returned to allow call chaining
-
getErasedSignature
Description copied from class:JavaTypeMethod 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:
getErasedSignaturein classJavaType- Parameters:
sb- StringBuilder to append signature to- Returns:
- StringBuilder that was passed in; returned to allow call chaining
-
getValueHandler
public <T> T getValueHandler()Description copied from class:JavaTypeMethod for accessing value handler associated with this type, if any- Overrides:
getValueHandlerin classJavaType
-
getTypeHandler
public <T> T getTypeHandler()Description copied from class:JavaTypeMethod for accessing type handler associated with this type, if any- Overrides:
getTypeHandlerin classJavaType
-
serializeWithType
public void serializeWithType(JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) throws IOException, JsonProcessingException - Specified by:
serializeWithTypein interfaceJsonSerializableWithType- Throws:
IOExceptionJsonProcessingException
-
serialize
public void serialize(JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException - Specified by:
serializein interfaceJsonSerializable- Throws:
IOExceptionJsonProcessingException
-
_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
-