java.lang.Object
tools.jackson.core.type.ResolvedType
tools.jackson.databind.JavaType
tools.jackson.databind.type.TypeBase
- All Implemented Interfaces:
Serializable,Type,JacksonSerializable
- Direct Known Subclasses:
ArrayType,CollectionLikeType,MapLikeType,PlaceholderForType,ResolvedRecursiveType,SimpleType
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface tools.jackson.databind.JacksonSerializable
JacksonSerializable.Base -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TypeBindingsBindings in effect for this type instance; possibly empty.protected final JavaTypeprotected final JavaType[]Fields inherited from class tools.jackson.databind.JavaType
_asStatic, _class, _hash, _typeHandler, _valueHandler -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTypeBase(Class<?> raw, TypeBindings bindings, JavaType superClass, JavaType[] superInts, int hash, Object valueHandler, Object typeHandler, boolean asStatic) Main constructor to use by extending classes.protectedCopy-constructor used when refining/upgrading type instances. -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringBuilder_classSignature(Class<?> cls, StringBuilder sb, boolean trailingSemicolon) protected boolean_hasNTypeParameters(int count) protected StringcontainedType(int index) intfinal JavaTypefindSuperType(Class<?> rawTarget) Method that may be called to find representation of given type within type hierarchy of this type: either this type (if this type has given erased type), one of its supertypes that has the erased types, or null if target is neither this type or any of its supertypes.JavaType[]findTypeParameters(Class<?> expType) Method that may be used to find paramaterization this type has for given type-erased generic target type.abstract 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 StringBuilderAccessor for finding fully resolved interfaces this type implements, if any; empty array if none.Accessor for finding fully resolved parent class of this type, if it has one; null if not.voidserialize(JsonGenerator gen, SerializationContext provider) Serialization method called when no additional type information is to be included in serialization.voidserializeWithType(JsonGenerator g, SerializationContext ctxt, TypeSerializer typeSer) Serialization method called when additional type information is expected to be included in serialization, for deserialization to use.Methods inherited from class tools.jackson.databind.JavaType
containedTypeOrUnknown, equals, getContentType, getContentTypeHandler, getContentValueHandler, getErasedSignature, getGenericSignature, getKeyType, getRawClass, getReferencedType, getTypeHandler, getValueHandler, hasContentType, hasGenericTypes, hasHandlers, hashCode, hasRawClass, hasValueHandler, isAbstract, isArrayType, isCollectionLikeType, isConcrete, isContainerType, isEnumImplType, isEnumType, isFinal, isInterface, isIterationType, isJavaLangObject, isMapLikeType, isPrimitive, isRecordType, isThrowable, isTypeOrSubTypeOf, isTypeOrSuperTypeOf, refine, toString, useStaticType, withContentType, withContentTypeHandler, withContentValueHandler, withHandlersFrom, withStaticTyping, withTypeHandler, withValueHandlerMethods inherited from class tools.jackson.core.type.ResolvedType
isReferenceTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.reflect.Type
getTypeName
-
Field Details
-
_superClass
-
_superInterfaces
-
_bindings
Bindings in effect for this type instance; possibly empty. Needed when resolving types declared in members of this type (if any).
-
-
Constructor Details
-
Method Details
-
toCanonical
- Specified by:
toCanonicalin classResolvedType
-
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
-
getBindings
- Specified by:
getBindingsin classJavaType
-
containedTypeCount
public int containedTypeCount()- Specified by:
containedTypeCountin classJavaType
-
containedType
- Specified by:
containedTypein classJavaType
-
getSuperClass
Description copied from class:JavaTypeAccessor for finding fully resolved parent class of this type, if it has one; null if not.- Specified by:
getSuperClassin classJavaType
-
getInterfaces
Description copied from class:JavaTypeAccessor for finding fully resolved interfaces this type implements, if any; empty array if none.- Specified by:
getInterfacesin classJavaType
-
findSuperType
Description copied from class:JavaTypeMethod that may be called to find representation of given type within type hierarchy of this type: either this type (if this type has given erased type), one of its supertypes that has the erased types, or null if target is neither this type or any of its supertypes.- Specified by:
findSuperTypein classJavaType
-
findTypeParameters
Description copied from class:JavaTypeMethod that may be used to find paramaterization this type has for given type-erased generic target type.- Specified by:
findTypeParametersin classJavaType
-
serializeWithType
public void serializeWithType(JsonGenerator g, SerializationContext ctxt, TypeSerializer typeSer) throws JacksonException Description copied from interface:JacksonSerializableSerialization method called when additional type information is expected to be included in serialization, for deserialization to use.Usually implementation consists of a call to
TypeSerializer.writeTypePrefix(tools.jackson.core.JsonGenerator, tools.jackson.databind.SerializationContext, tools.jackson.core.type.WritableTypeId)followed by serialization of contents, followed by a call toTypeSerializer.writeTypeSuffix(tools.jackson.core.JsonGenerator, tools.jackson.databind.SerializationContext, tools.jackson.core.type.WritableTypeId)). Details of the type id argument to pass depend on shape of JSON Object used (Array, Object or scalar like String/Number/Boolean).Note that some types (most notably, "natural" types: String, Integer, Double and Boolean) never include type information.
- Specified by:
serializeWithTypein interfaceJacksonSerializable- Throws:
JacksonException
-
serialize
Description copied from interface:JacksonSerializableSerialization method called when no additional type information is to be included in serialization.- Specified by:
serializein interfaceJacksonSerializable- Throws:
JacksonException
-
_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
-
_hasNTypeParameters
protected boolean _hasNTypeParameters(int count)
-