|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.jackson.map.AnnotationIntrospector
org.codehaus.jackson.map.AnnotationIntrospector.Pair
public static class AnnotationIntrospector.Pair
Helper class that allows using 2 introspectors such that one introspector acts as the primary one to use; and second one as a fallback used if the primary does not provide conclusive or useful result for a method.
An obvious consequence of priority is that it is easy to construct longer chains of introspectors by linking multiple pairs. Currently most likely combination is that of using the default Jackson provider, along with JAXB annotation introspector (available since version 1.1).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.codehaus.jackson.map.AnnotationIntrospector |
|---|
AnnotationIntrospector.Pair |
| Constructor Summary | |
|---|---|
AnnotationIntrospector.Pair(AnnotationIntrospector p,
AnnotationIntrospector s)
|
|
| Method Summary | |
|---|---|
Boolean |
findCachability(AnnotatedClass ac)
Method that checks whether specified class has annotations that indicate that it is (or is not) cachable. |
Class<? extends JsonDeserializer<?>> |
findContentDeserializer(Annotated am)
Method for getting a deserializer definition for content (values) of associated Collection, array or
Map property. |
Boolean |
findCreatorAutoDetection(AnnotatedClass ac)
Method for checking whether there is a class annotation that indicates whether creator-method auto detection should be enabled. |
String |
findDeserializablePropertyName(AnnotatedField af)
Method for checking whether given member field represent a deserializable logical property; and if so, returns the name of that property. |
Class<?> |
findDeserializationContentType(Annotated am)
Method for accessing additional narrowing type definition that a method can have, to define more specific content type to use; content refers to Map values and Collection/array elements. |
Class<?> |
findDeserializationKeyType(Annotated am)
Method for accessing additional narrowing type definition that a method can have, to define more specific key type to use. |
Class<?> |
findDeserializationType(Annotated am)
Method for accessing annotated type definition that a method can have, to be used as the type for serialization instead of the runtime type. |
Object |
findDeserializer(Annotated am)
Method for getting a deserializer definition on specified method or field. |
String |
findEnumValue(Enum<?> value)
Method for determining the String value to use for serializing given enumeration entry; used when serializing enumerations as Strings (the standard method). |
Boolean |
findFieldAutoDetection(AnnotatedClass ac)
Method for checking whether there is a class annotation that indicates whether field auto detection should be enabled. |
String |
findGettablePropertyName(AnnotatedMethod am)
Method for checking whether given method has an annotation that suggests property name associated with method that may be a "getter". |
Boolean |
findGetterAutoDetection(AnnotatedClass ac)
Method for checking whether there is a class annotation that indicates whether (regular) getter-method auto detection should be enabled. |
Boolean |
findIsGetterAutoDetection(AnnotatedClass ac)
Method for checking whether there is a class annotation that indicates whether (regular) getter-method auto detection should be enabled. |
Class<? extends KeyDeserializer> |
findKeyDeserializer(Annotated am)
Method for getting a deserializer definition for keys of associated Map property. |
String |
findNamespace(Annotated ann)
Combination logic is such that if the primary returns non-null non-empty namespace, that is returned. |
String |
findPropertyNameForParam(AnnotatedParameter param)
Method for checking whether given set of annotations indicates property name for associated parameter. |
String |
findRootName(AnnotatedClass ac)
Method for locating name used as "root name" (for use by some serializers when outputting root-level object -- mostly for XML compatibility purposes) for given class, if one is defined. |
String |
findSerializablePropertyName(AnnotatedField af)
Method for checking whether given member field represent a serializable logical property; and if so, returns the name of that property. |
JsonSerialize.Inclusion |
findSerializationInclusion(Annotated a,
JsonSerialize.Inclusion defValue)
Method for checking whether given annotated entity (class, method, field) defines which Bean/Map properties are to be included in serialization. |
Class<?> |
findSerializationType(Annotated a)
Method for accessing annotated type definition that a method/field can have, to be used as the type for serialization instead of the runtime type. |
JsonSerialize.Typing |
findSerializationTyping(Annotated a)
Method for accessing declared typing mode annotated (if any). |
Object |
findSerializer(Annotated am)
Method for getting a serializer definition on specified method or field. |
String |
findSettablePropertyName(AnnotatedMethod am)
Method for checking whether given method has an annotation that suggests property name associated with method that may be a "setter". |
Boolean |
findSetterAutoDetection(AnnotatedClass ac)
Method for checking whether there is a class annotation that indicates whether setter-method auto detection should be enabled. |
boolean |
hasAnySetterAnnotation(AnnotatedMethod am)
Method for checking whether given method has an annotation that suggests that the method is to serve as "any setter"; method to be used for setting values of any properties for which no dedicated setter method is found. |
boolean |
hasAsValueAnnotation(AnnotatedMethod am)
Method for checking whether given method has an annotation that suggests that the return value of annotated method should be used as "the value" of the object instance; usually serialized as a primitive value such as String or number. |
boolean |
hasCreatorAnnotation(Annotated a)
Method for checking whether given annotated item (method, constructor) has an annotation that suggests that the method is a "creator" (aka factory) method to be used for construct new instances of deserialized values. |
boolean |
isHandled(Annotation ann)
Method called by framework to determine whether given annotation is handled by this introspector. |
boolean |
isIgnorableConstructor(AnnotatedConstructor c)
|
boolean |
isIgnorableField(AnnotatedField f)
Method for checking whether there is an annotation that indicates that given field should be ignored for all operations (serialization, deserialization). |
boolean |
isIgnorableMethod(AnnotatedMethod m)
Method for checking whether there is an annotation that indicates that given method should be ignored for all operations (serialization, deserialization). |
| Methods inherited from class org.codehaus.jackson.map.AnnotationIntrospector |
|---|
nopInstance, pair |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationIntrospector.Pair(AnnotationIntrospector p,
AnnotationIntrospector s)
| Method Detail |
|---|
public boolean isHandled(Annotation ann)
AnnotationIntrospector
isHandled in class AnnotationIntrospectorpublic String findNamespace(Annotated ann)
findNamespace in class AnnotationIntrospectorpublic Boolean findCachability(AnnotatedClass ac)
AnnotationIntrospectorCurrently only used with deserializers, to determine whether provider should cache instances, and if no annotations are found, assumes non-cachable instances.
findCachability in class AnnotationIntrospectorpublic Boolean findFieldAutoDetection(AnnotatedClass ac)
AnnotationIntrospector
findFieldAutoDetection in class AnnotationIntrospectorpublic String findRootName(AnnotatedClass ac)
AnnotationIntrospector
findRootName in class AnnotationIntrospectorpublic boolean isIgnorableMethod(AnnotatedMethod m)
AnnotationIntrospectorNote that this method should ONLY return true for such explicit ignoral cases; and not if method just happens not to be visible for annotation processor.
isIgnorableMethod in class AnnotationIntrospectorpublic boolean isIgnorableConstructor(AnnotatedConstructor c)
isIgnorableConstructor in class AnnotationIntrospectorpublic boolean isIgnorableField(AnnotatedField f)
AnnotationIntrospector
isIgnorableField in class AnnotationIntrospectorpublic Object findSerializer(Annotated am)
AnnotationIntrospectorJsonSerializer) or Class (of type
Class); if value of different
type is returned, a runtime exception may be thrown by caller.
findSerializer in class AnnotationIntrospector
public JsonSerialize.Inclusion findSerializationInclusion(Annotated a,
JsonSerialize.Inclusion defValue)
AnnotationIntrospector
findSerializationInclusion in class AnnotationIntrospectorpublic Class<?> findSerializationType(Annotated a)
AnnotationIntrospector
findSerializationType in class AnnotationIntrospectorpublic JsonSerialize.Typing findSerializationTyping(Annotated a)
AnnotationIntrospector
findSerializationTyping in class AnnotationIntrospectorpublic Boolean findGetterAutoDetection(AnnotatedClass ac)
AnnotationIntrospector
findGetterAutoDetection in class AnnotationIntrospectorpublic Boolean findIsGetterAutoDetection(AnnotatedClass ac)
AnnotationIntrospector
findIsGetterAutoDetection in class AnnotationIntrospectorpublic String findGettablePropertyName(AnnotatedMethod am)
AnnotationIntrospector
findGettablePropertyName in class AnnotationIntrospectorpublic boolean hasAsValueAnnotation(AnnotatedMethod am)
AnnotationIntrospector
hasAsValueAnnotation in class AnnotationIntrospectorpublic String findEnumValue(Enum<?> value)
AnnotationIntrospector
findEnumValue in class AnnotationIntrospectorpublic String findSerializablePropertyName(AnnotatedField af)
AnnotationIntrospector
findSerializablePropertyName in class AnnotationIntrospectorpublic Object findDeserializer(Annotated am)
AnnotationIntrospectorJsonDeserializer) or Class (of type
Class); if value of different
type is returned, a runtime exception may be thrown by caller.
findDeserializer in class AnnotationIntrospectorpublic Class<? extends KeyDeserializer> findKeyDeserializer(Annotated am)
AnnotationIntrospectorMap property.
Type of definition is either instance (of type
JsonDeserializer) or Class (of type
Class); if value of different
type is returned, a runtime exception may be thrown by caller.
findKeyDeserializer in class AnnotationIntrospectorpublic Class<? extends JsonDeserializer<?>> findContentDeserializer(Annotated am)
AnnotationIntrospectorCollection, array or
Map property.
Type of definition is either instance (of type
JsonDeserializer) or Class (of type
Class); if value of different
type is returned, a runtime exception may be thrown by caller.
findContentDeserializer in class AnnotationIntrospectorpublic Class<?> findDeserializationType(Annotated am)
AnnotationIntrospector
findDeserializationType in class AnnotationIntrospectorpublic Class<?> findDeserializationKeyType(Annotated am)
AnnotationIntrospectorMap types.
findDeserializationKeyType in class AnnotationIntrospectorpublic Class<?> findDeserializationContentType(Annotated am)
AnnotationIntrospector
findDeserializationContentType in class AnnotationIntrospectorpublic Boolean findCreatorAutoDetection(AnnotatedClass ac)
AnnotationIntrospector
findCreatorAutoDetection in class AnnotationIntrospectorpublic Boolean findSetterAutoDetection(AnnotatedClass ac)
AnnotationIntrospector
findSetterAutoDetection in class AnnotationIntrospectorpublic String findSettablePropertyName(AnnotatedMethod am)
AnnotationIntrospector
findSettablePropertyName in class AnnotationIntrospectorpublic boolean hasAnySetterAnnotation(AnnotatedMethod am)
AnnotationIntrospector
hasAnySetterAnnotation in class AnnotationIntrospectorpublic boolean hasCreatorAnnotation(Annotated a)
AnnotationIntrospector
hasCreatorAnnotation in class AnnotationIntrospectorpublic String findDeserializablePropertyName(AnnotatedField af)
AnnotationIntrospector
findDeserializablePropertyName in class AnnotationIntrospectorpublic String findPropertyNameForParam(AnnotatedParameter param)
AnnotationIntrospector
findPropertyNameForParam in class AnnotationIntrospector
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||