|
||||||||||
| 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.CollectionLikeType
public class CollectionLikeType
Type that represents things that act similar to Collection;
but may or may not be instances of that interface.
This specifically allows framework to check for configuration and annotation
settings used for Map types, and pass these to custom handlers that may be more
familiar with actual type.
| Field Summary | |
|---|---|
protected JavaType |
_elementType
Type of elements in collection |
| Fields inherited from class com.fasterxml.jackson.databind.JavaType |
|---|
_class, _hashCode, _typeHandler, _valueHandler |
| Constructor Summary | |
|---|---|
protected |
CollectionLikeType(Class<?> collT,
JavaType elemT,
Object valueHandler,
Object typeHandler)
|
| Method Summary | |
|---|---|
protected JavaType |
_narrow(Class<?> subclass)
|
protected String |
buildCanonicalName()
|
static CollectionLikeType |
construct(Class<?> rawType,
JavaType elemT)
|
JavaType |
containedType(int index)
|
int |
containedTypeCount()
|
String |
containedTypeName(int index)
Not sure if we should count on this, but type names for core interfaces use "E" for element type |
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 |
isCollectionLikeType()
|
boolean |
isContainerType()
|
boolean |
isTrueCollectionType()
Method that can be used for checking whether this type is a "real" Collection type; meaning whether it represents a parameterized subtype of Collection or just something that acts
like one. |
JavaType |
narrowContentsBy(Class<?> contentClass)
|
String |
toString()
|
JavaType |
widenContentsBy(Class<?> contentClass)
|
CollectionLikeType |
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. |
CollectionLikeType |
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. |
CollectionLikeType |
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. |
CollectionLikeType |
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, hasGenericTypes, hashCode, hasRawClass, isAbstract, isArrayType, isConcrete, 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 _elementType
| Constructor Detail |
|---|
protected CollectionLikeType(Class<?> collT,
JavaType elemT,
Object valueHandler,
Object typeHandler)
| Method Detail |
|---|
protected JavaType _narrow(Class<?> subclass)
_narrow in class JavaTypepublic JavaType narrowContentsBy(Class<?> contentClass)
narrowContentsBy in class JavaTypepublic JavaType widenContentsBy(Class<?> contentClass)
widenContentsBy in class JavaType
public static CollectionLikeType construct(Class<?> rawType,
JavaType elemT)
public CollectionLikeType withTypeHandler(Object h)
JavaType
withTypeHandler in class JavaTypepublic CollectionLikeType withContentTypeHandler(Object h)
JavaType
withContentTypeHandler in class JavaTypepublic CollectionLikeType withValueHandler(Object h)
JavaType
withValueHandler in class JavaTypepublic CollectionLikeType withContentValueHandler(Object h)
JavaType
withContentValueHandler in class JavaTypepublic boolean isContainerType()
isContainerType in class JavaTypepublic boolean isCollectionLikeType()
isCollectionLikeType in class JavaTypeCollection type,
or something similar (meaning it has at least one type parameter,
which describes type of contents)public JavaType getContentType()
getContentType 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 StringBuilder getErasedSignature(StringBuilder sb)
JavaType
getErasedSignature in class TypeBasesb - StringBuilder to append signature to
public StringBuilder getGenericSignature(StringBuilder sb)
getGenericSignature in class TypeBasesb - StringBuilder to append signature to
protected String buildCanonicalName()
buildCanonicalName in class TypeBasepublic boolean isTrueCollectionType()
Collection or just something that acts
like one.
public boolean equals(Object o)
equals in class JavaTypepublic String toString()
toString in class JavaType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||