public final class ArrayType extends TypeBase
JavaType.JsonSerializable.Base| Modifier and Type | Field and Description |
|---|---|
protected JavaType |
_componentType
Type of elements in the array.
|
protected Object |
_emptyArray
We will also keep track of shareable instance of empty array,
since it usually needs to be constructed any way; and because
it is essentially immutable and thus can be shared.
|
_bindings, _superClass, _superInterfaces_asStatic, _class, _hash, _typeHandler, _valueHandler| Modifier | Constructor and Description |
|---|---|
protected |
ArrayType(JavaType componentType,
TypeBindings bindings,
Object emptyInstance,
Object valueHandler,
Object typeHandler,
boolean asStatic) |
| Modifier and Type | Method and Description |
|---|---|
protected JavaType |
_narrow(Class<?> subclass)
Deprecated.
|
static ArrayType |
construct(JavaType componentType,
TypeBindings bindings) |
static ArrayType |
construct(JavaType componentType,
TypeBindings bindings,
Object valueHandler,
Object typeHandler) |
boolean |
equals(Object o) |
JavaType |
getContentType() |
Object |
getContentTypeHandler()
Internal accessor that should not be used by any code outside of
jackson-databind: only used internally by databind.
|
Object |
getContentValueHandler()
Internal accessor that should not be used by any code outside of
jackson-databind: only used internally by databind.
|
Object[] |
getEmptyArray() |
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) |
boolean |
hasGenericTypes() |
boolean |
hasHandlers()
Helper method that checks whether this type, or its (optional) key
or content type has
JavaType.getValueHandler() or JavaType.getTypeHandler();
that is, are there any non-standard handlers associated with this
type object. |
boolean |
isAbstract()
For some odd reason, modifiers for array classes would
claim they are abstract types.
|
boolean |
isArrayType() |
boolean |
isConcrete()
For some odd reason, modifiers for array classes would
claim they are abstract types.
|
boolean |
isContainerType() |
JavaType |
refine(Class<?> contentClass,
TypeBindings bindings,
JavaType superClass,
JavaType[] superInterfaces)
Mutant factory method that will try to create and return a sub-type instance
for known parameterized types; for other types will return `null` to indicate
that no just refinement makes necessary sense, without trying to detect
special status through implemented interfaces.
|
String |
toString() |
JavaType |
withContentType(JavaType contentType)
Mutant factory method that may be called on structured types
that have a so-called content type (element of arrays, value type
of Maps, referenced type of referential types),
and will construct a new instance that is identical to
this instance, except that it has specified content type, instead of current
one.
|
ArrayType |
withContentTypeHandler(Object h)
Internal method that should not be used by any code outside of
jackson-databind: only used internally by databind.
|
ArrayType |
withContentValueHandler(Object h)
Internal method that should not be used by any code outside of
jackson-databind: only used internally by databind.
|
ArrayType |
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.
|
ArrayType |
withTypeHandler(Object h)
Internal method that should not be used by any code outside of
jackson-databind: only used internally by databind.
|
ArrayType |
withValueHandler(Object h)
Internal method that should not be used by any code outside of
jackson-databind: only used internally by databind.
|
_bogusSuperClass, _classSignature, _hasNTypeParameters, buildCanonicalName, containedType, containedTypeCount, containedTypeName, findSuperType, findTypeParameters, getBindings, getInterfaces, getSuperClass, serialize, serializeWithType, toCanonicalcontainedTypeOrUnknown, forcedNarrowBy, getErasedSignature, getGenericSignature, getKeyType, getParameterSource, getRawClass, getReferencedType, getTypeHandler, getValueHandler, hasContentType, hashCode, hasRawClass, hasValueHandler, isCollectionLikeType, isEnumImplType, isEnumType, isFinal, isInterface, isJavaLangObject, isMapLikeType, isPrimitive, isRecordType, isThrowable, isTypeOrSubTypeOf, isTypeOrSuperTypeOf, useStaticType, withHandlersFromisReferenceTypeclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTypeNameprotected final JavaType _componentType
protected final Object _emptyArray
protected ArrayType(JavaType componentType, TypeBindings bindings, Object emptyInstance, Object valueHandler, Object typeHandler, boolean asStatic)
public static ArrayType construct(JavaType componentType, TypeBindings bindings)
public static ArrayType construct(JavaType componentType, TypeBindings bindings, Object valueHandler, Object typeHandler)
public JavaType withContentType(JavaType contentType)
JavaTypethis is returned.
If type does not have a content type (which is the case with
SimpleType), IllegalArgumentException
will be thrown.withContentType in class JavaTypepublic ArrayType withTypeHandler(Object h)
JavaTypeThis mutant factory method will construct a new instance that is identical to this instance, except that it will have specified type handler assigned.
withTypeHandler in class JavaTypeh - Handler to pass to new instance createdpublic ArrayType withContentTypeHandler(Object h)
JavaTypeThis mutant factory method will construct a new instance that is identical to this instance, except that it will have specified content type (element type for arrays, value type for Maps and so forth) handler assigned.
withContentTypeHandler in class JavaTypeh - Handler to pass to new instance createdpublic ArrayType withValueHandler(Object h)
JavaTypeThis mutant factory method will construct a new instance that is identical to this instance, except that it will have specified value handler assigned.
withValueHandler in class JavaTypeh - Handler to pass to new instance createdpublic ArrayType withContentValueHandler(Object h)
JavaTypeMutant factory method that will construct a new instance that is identical to this instance, except that it will have specified content value handler assigned.
withContentValueHandler in class JavaTypeh - Handler to pass to new instance createdpublic ArrayType withStaticTyping()
JavaTypewithStaticTyping in class JavaType@Deprecated protected JavaType _narrow(Class<?> subclass)
public JavaType refine(Class<?> contentClass, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces)
JavaTypepublic boolean isArrayType()
isArrayType in class JavaTypepublic boolean isAbstract()
isAbstract in class JavaTypepublic boolean isConcrete()
isConcrete in class JavaTypepublic boolean hasGenericTypes()
hasGenericTypes in class JavaTypepublic boolean isContainerType()
isContainerType in class JavaTypepublic JavaType getContentType()
getContentType in class JavaTypepublic Object getContentValueHandler()
JavaTypegetContentValueHandler in class JavaTypepublic Object getContentTypeHandler()
JavaTypegetContentTypeHandler in class JavaTypepublic boolean hasHandlers()
JavaTypeJavaType.getValueHandler() or JavaType.getTypeHandler();
that is, are there any non-standard handlers associated with this
type object.hasHandlers in class JavaTypepublic StringBuilder getGenericSignature(StringBuilder sb)
getGenericSignature in class TypeBasesb - StringBuilder to append signature topublic StringBuilder getErasedSignature(StringBuilder sb)
JavaTypegetErasedSignature in class TypeBasesb - StringBuilder to append signature topublic Object[] getEmptyArray()
Copyright © 2008–2022 FasterXML. All rights reserved.