public class SimpleType extends TypeBase
JsonSerializable.Base| Modifier and Type | Field and Description |
|---|---|
protected String[] |
_typeNames
Names of generic type arguments for this type; will
match values in
_typeParameters |
protected JavaType[] |
_typeParameters
Generic type arguments for this type.
|
protected Class<?> |
_typeParametersFor
In case there are resolved type parameters, this field stores reference
to that type.
|
_asStatic, _class, _hash, _typeHandler, _valueHandler| Modifier | Constructor and Description |
|---|---|
protected |
SimpleType(Class<?> cls) |
protected |
SimpleType(Class<?> cls,
int extraHash,
Object valueHandler,
Object typeHandler,
boolean asStatic)
Pass-through constructor used by
ReferenceType. |
protected |
SimpleType(Class<?> cls,
String[] typeNames,
JavaType[] typeParams,
Object valueHandler,
Object typeHandler,
boolean asStatic)
Deprecated.
Since 2.5 use variant that takes one more argument
|
protected |
SimpleType(Class<?> cls,
String[] typeNames,
JavaType[] typeParams,
Object valueHandler,
Object typeHandler,
boolean asStatic,
Class<?> parametersFrom) |
| Modifier and Type | Method and Description |
|---|---|
protected JavaType |
_narrow(Class<?> subclass) |
protected String |
buildCanonicalName() |
static SimpleType |
construct(Class<?> cls) |
static SimpleType |
constructUnsafe(Class<?> raw)
Method used by core Jackson classes: NOT to be used by application code.
|
JavaType |
containedType(int index) |
int |
containedTypeCount() |
String |
containedTypeName(int index) |
boolean |
equals(Object o) |
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.
|
StringBuilder |
getGenericSignature(StringBuilder sb) |
Class<?> |
getParameterSource() |
boolean |
isContainerType() |
JavaType |
narrowContentsBy(Class<?> subclass) |
String |
toString() |
JavaType |
widenContentsBy(Class<?> subclass) |
JavaType |
withContentTypeHandler(Object h)
"Copy method" that will construct a new instance that is identical to
this instance, except that its content type will have specified
type handler assigned.
|
SimpleType |
withContentValueHandler(Object h)
"Copy method" that will construct a new instance that is identical to
this instance, except that it will have specified content value handler assigned.
|
SimpleType |
withStaticTyping()
Method that can be called to get a type instance that indicates
that values of the type should be handled using "static typing" for purposes
of serialization (as opposed to "dynamic" aka runtime typing):
meaning that no runtime information is needed for determining serializers to use.
|
SimpleType |
withTypeHandler(Object h)
"Copy method" that will construct a new instance that is identical to
this instance, except that it will have specified type handler assigned.
|
SimpleType |
withValueHandler(Object h)
"Copy method" that will construct a new instance that is identical to
this instance, except that it will have specified value handler assigned.
|
_classSignature, getTypeHandler, getValueHandler, serialize, serializeWithType, toCanonical_assertSubclass, _widen, containedTypeOrUnknown, forcedNarrowBy, getContentType, getErasedSignature, getGenericSignature, getKeyType, getRawClass, getReferencedType, hasGenericTypes, hashCode, hasRawClass, hasValueHandler, isAbstract, isArrayType, isCollectionLikeType, isConcrete, isEnumType, isFinal, isInterface, isJavaLangObject, isMapLikeType, isPrimitive, isThrowable, isTypeOrSubTypeOf, narrowBy, useStaticType, widenByclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTypeNameprotected final Class<?> _typeParametersFor
JavaType.getRawClass() or its supertype.protected final JavaType[] _typeParameters
protected final String[] _typeNames
_typeParametersprotected SimpleType(Class<?> cls)
@Deprecated protected SimpleType(Class<?> cls, String[] typeNames, JavaType[] typeParams, Object valueHandler, Object typeHandler, boolean asStatic)
protected SimpleType(Class<?> cls, String[] typeNames, JavaType[] typeParams, Object valueHandler, Object typeHandler, boolean asStatic, Class<?> parametersFrom)
parametersFrom - Interface or abstract class implemented by this type,
and for which type parameters apply. It may be cls itself,
but more commonly it is one of its supertypes.protected SimpleType(Class<?> cls, int extraHash, Object valueHandler, Object typeHandler, boolean asStatic)
ReferenceType.public static SimpleType constructUnsafe(Class<?> raw)
NOTE: public only because it is called by ObjectMapper which is
not in same package
public JavaType narrowContentsBy(Class<?> subclass)
narrowContentsBy in class JavaTypepublic JavaType widenContentsBy(Class<?> subclass)
widenContentsBy in class JavaTypepublic static SimpleType construct(Class<?> cls)
public SimpleType withTypeHandler(Object h)
JavaTypewithTypeHandler in class JavaTypepublic JavaType withContentTypeHandler(Object h)
JavaTypewithContentTypeHandler in class JavaTypepublic SimpleType withValueHandler(Object h)
JavaTypewithValueHandler in class JavaTypepublic SimpleType withContentValueHandler(Object h)
JavaTypewithContentValueHandler in class JavaTypepublic SimpleType withStaticTyping()
JavaTypewithStaticTyping in class JavaTypeprotected String buildCanonicalName()
buildCanonicalName in class TypeBasepublic boolean isContainerType()
isContainerType in class JavaTypepublic int containedTypeCount()
containedTypeCount in class JavaTypepublic JavaType containedType(int index)
containedType in class JavaTypepublic String containedTypeName(int index)
containedTypeName in class JavaTypepublic Class<?> getParameterSource()
getParameterSource in class JavaTypepublic StringBuilder getErasedSignature(StringBuilder sb)
JavaTypegetErasedSignature in class TypeBasesb - StringBuilder to append signature topublic StringBuilder getGenericSignature(StringBuilder sb)
getGenericSignature in class TypeBasesb - StringBuilder to append signature toCopyright © 2014–2015 FasterXML. All rights reserved.