|
||||||||||
| 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
org.codehaus.jackson.map.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 |
|---|
| Fields inherited from class org.codehaus.jackson.type.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)
|
JavaType |
containedType(int index)
Method for accessing definitions of contained ("child") types. |
int |
containedTypeCount()
Method for checking how many contained types this type has. |
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)
|
List<JavaType> |
findGenericTypesFor(Class<?> genericClass)
Method for finding actual parametrization for specific generic class or interface, extended or implemented by this type. |
JavaType |
getContentType()
Method for accessing content type of this type, if type has such a thing: simple types do not, structured types do (like arrays, Collections and Maps) |
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()
Method that can be used to find out if the type directly declares generic parameters (for its direct super-class and/or super-interfaces). |
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()
|
| Methods inherited from class org.codehaus.jackson.map.type.TypeBase |
|---|
_classSignature, copyHandlers, toCanonical |
| Methods inherited from class org.codehaus.jackson.type.JavaType |
|---|
_assertSubclass, _widen, forcedNarrowBy, getErasedSignature, getGenericSignature, getKeyType, getRawClass, getTypeHandler, getValueHandler, hashCode, hasRawClass, isEnumType, isFinal, isInterface, isPrimitive, isThrowable, narrowBy, setTypeHandler, setValueHandler, widenBy |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static ArrayType construct(JavaType componentType)
protected String buildCanonicalName()
buildCanonicalName in class TypeBaseprotected JavaType _narrow(Class<?> subclass)
_narrow in class JavaTypepublic JavaType narrowContentsBy(Class<?> contentClass)
narrowContentsBy in class JavaTypepublic boolean isArrayType()
isArrayType in class JavaTypepublic boolean isAbstract()
isAbstract in class JavaTypepublic boolean isConcrete()
isConcrete in class JavaTypepublic boolean hasGenericTypes()
JavaType
hasGenericTypes in class JavaTypepublic List<JavaType> findGenericTypesFor(Class<?> genericClass)
JavaTypeMaps
or Collections.
findGenericTypesFor in class TypeBasepublic String containedTypeName(int index)
containedTypeName in class JavaTypeindex - Index of contained type to return
public boolean isContainerType()
isContainerType in class JavaTypepublic JavaType getContentType()
JavaType
getContentType in class JavaTypepublic int containedTypeCount()
JavaType
containedTypeCount in class JavaTypepublic JavaType containedType(int index)
JavaType
containedType in class JavaTypeindex - Index of contained type to return
public 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 | ||||||||||