|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.type.JavaType
org.codehaus.jackson.map.type.TypeBase
public abstract class TypeBase
Field Summary |
---|
Fields inherited from class org.codehaus.jackson.type.JavaType |
---|
_class, _hashCode, _typeHandler, _valueHandler |
Constructor Summary | |
---|---|
protected |
TypeBase(Class<?> raw,
int hash)
Deprecated. |
protected |
TypeBase(Class<?> raw,
int hash,
Object valueHandler,
Object typeHandler)
Main constructor to use by extending classes. |
Method Summary | ||
---|---|---|
protected static StringBuilder |
_classSignature(Class<?> cls,
StringBuilder sb,
boolean trailingSemicolon)
|
|
protected abstract String |
buildCanonicalName()
|
|
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)
|
|
|
getTypeHandler()
Method for accessing type handler associated with this type, if any |
|
|
getValueHandler()
Method for accessing value handler associated with this type, if any |
|
void |
serialize(JsonGenerator jgen,
SerializerProvider provider)
|
|
void |
serializeWithType(JsonGenerator jgen,
SerializerProvider provider,
TypeSerializer typeSer)
|
|
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, hasGenericTypes, hashCode, hasRawClass, isAbstract, isArrayType, isCollectionLikeType, isConcrete, isContainerType, isEnumType, isFinal, isInterface, isMapLikeType, isPrimitive, isThrowable, narrowBy, narrowContentsBy, setValueHandler, toString, widenBy, widenContentsBy, withContentTypeHandler, withContentValueHandler, withTypeHandler, withValueHandler |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
@Deprecated protected TypeBase(Class<?> raw, int hash)
protected TypeBase(Class<?> raw, int hash, Object valueHandler, Object typeHandler)
Method Detail |
---|
public String toCanonical()
JavaType
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.
toCanonical
in class JavaType
protected abstract String buildCanonicalName()
public abstract StringBuilder getGenericSignature(StringBuilder sb)
getGenericSignature
in class JavaType
sb
- StringBuilder to append signature to
public abstract StringBuilder getErasedSignature(StringBuilder sb)
JavaType
getErasedSignature
in class JavaType
sb
- StringBuilder to append signature to
public <T> T getValueHandler()
JavaType
getValueHandler
in class JavaType
public <T> T getTypeHandler()
JavaType
getTypeHandler
in class JavaType
public void serializeWithType(JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) throws IOException, JsonProcessingException
serializeWithType
in interface JsonSerializableWithType
IOException
JsonProcessingException
public void serialize(JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException
serialize
in interface JsonSerializable
IOException
JsonProcessingException
protected static StringBuilder _classSignature(Class<?> cls, StringBuilder sb, boolean trailingSemicolon)
trailingSemicolon
- Whether to add trailing semicolon for non-primitive
(reference) types or not
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |