|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fasterxml.jackson.core.type.ResolvedType
com.fasterxml.jackson.databind.JavaType
com.fasterxml.jackson.databind.type.TypeBase
com.fasterxml.jackson.databind.type.ArrayType
public final class ArrayType
Array types represent Java arrays, both primitive and object valued.
Further, Object-valued arrays can have element type of any other
legal JavaType.
| Field Summary | |
|---|---|
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. |
| Fields inherited from class com.fasterxml.jackson.databind.JavaType |
|---|
_class, _hashCode, _typeHandler, _valueHandler |
| Method Summary | |
|---|---|
protected JavaType |
_narrow(Class<?> subclass)
Handling of narrowing conversions for arrays is trickier: for now, it is not even allowed. |
protected String |
buildCanonicalName()
|
static ArrayType |
construct(JavaType componentType,
Object valueHandler,
Object typeHandler)
|
JavaType |
containedType(int index)
|
int |
containedTypeCount()
|
String |
containedTypeName(int index)
Not sure what symbolic name is used internally, if any; let's follow naming of Collection types here. |
boolean |
equals(Object o)
|
JavaType |
getContentType()
|
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 |
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 |
narrowContentsBy(Class<?> contentClass)
For array types, both main type and content type can be modified; but ultimately they are interchangeable. |
String |
toString()
|
JavaType |
widenContentsBy(Class<?> contentClass)
|
ArrayType |
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. |
ArrayType |
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. |
ArrayType |
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. |
ArrayType |
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. |
| Methods inherited from class com.fasterxml.jackson.databind.type.TypeBase |
|---|
_classSignature, getTypeHandler, getValueHandler, serialize, serializeWithType, toCanonical |
| Methods inherited from class com.fasterxml.jackson.databind.JavaType |
|---|
_assertSubclass, _widen, forcedNarrowBy, getErasedSignature, getGenericSignature, getKeyType, getRawClass, hashCode, hasRawClass, isCollectionLikeType, isEnumType, isFinal, isInterface, isMapLikeType, isPrimitive, isThrowable, narrowBy, widenBy |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final JavaType _componentType
protected final Object _emptyArray
| Method Detail |
|---|
public static ArrayType construct(JavaType componentType,
Object valueHandler,
Object typeHandler)
public ArrayType withTypeHandler(Object h)
JavaType
withTypeHandler in class JavaTypepublic ArrayType withContentTypeHandler(Object h)
JavaType
withContentTypeHandler in class JavaTypepublic ArrayType withValueHandler(Object h)
JavaType
withValueHandler in class JavaTypepublic ArrayType withContentValueHandler(Object h)
JavaType
withContentValueHandler in class JavaTypeprotected String buildCanonicalName()
buildCanonicalName in class TypeBaseprotected JavaType _narrow(Class<?> subclass)
_narrow in class JavaTypepublic JavaType narrowContentsBy(Class<?> contentClass)
narrowContentsBy in class JavaTypepublic JavaType widenContentsBy(Class<?> contentClass)
widenContentsBy in class 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 String containedTypeName(int index)
containedTypeName in class JavaTypepublic boolean isContainerType()
isContainerType in class JavaTypepublic JavaType getContentType()
getContentType in class JavaTypepublic int containedTypeCount()
containedTypeCount in class JavaTypepublic JavaType containedType(int index)
containedType in class JavaTypepublic StringBuilder getGenericSignature(StringBuilder sb)
getGenericSignature in class TypeBasesb - StringBuilder to append signature to
public StringBuilder getErasedSignature(StringBuilder sb)
JavaType
getErasedSignature in class TypeBasesb - StringBuilder to append signature to
public String toString()
toString in class JavaTypepublic boolean equals(Object o)
equals in class JavaType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||