|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.jackson.map.BeanDescription
org.codehaus.jackson.map.introspect.BasicBeanDescription
public class BasicBeanDescription
| Field Summary |
|---|
| Fields inherited from class org.codehaus.jackson.map.BeanDescription |
|---|
_class |
| Constructor Summary | |
|---|---|
BasicBeanDescription(java.lang.Class<?> forClass,
AnnotatedClass ac)
|
|
| Method Summary | ||
|---|---|---|
static java.lang.String |
descFor(java.lang.reflect.AnnotatedElement elem)
Helper method used to describe an annotated element of type Class or Method. |
|
AnnotatedMethod |
findAnySetter()
Method used to locate the method of introspected class that implements JsonAnySetter. |
|
java.lang.reflect.Constructor<?> |
findDefaultConstructor()
Method that will locate the no-arg constructor for this class, if it has one, and that constructor has not been marked as ignorable. |
|
java.lang.reflect.Method |
findFactoryMethod(java.lang.Class<?>... expArgTypes)
Method that can be called to find if introspected class declares a static "valueOf" factory method that returns an instance of introspected type, given one of acceptable types. |
|
java.util.LinkedHashMap<java.lang.String,AnnotatedMethod> |
findGetters(boolean autodetect,
java.util.Collection<java.lang.String> ignoredProperties)
|
|
AnnotatedMethod |
findJsonValue()
Method for locating the getter method that is annotated with JsonValue annotation, if any. |
|
AnnotatedMethod |
findMethod(java.lang.String name,
java.lang.Class<?>[] paramTypes)
|
|
java.util.LinkedHashMap<java.lang.String,AnnotatedMethod> |
findSetters(boolean autodetect)
|
|
java.lang.reflect.Constructor<?> |
findSingleArgConstructor(java.lang.Class<?>... argTypes)
Method that can be called to locate a single-arg constructor that takes specified exact type (will not accept supertype constructors) |
|
protected
|
findUniqueMethodWith(java.lang.Class<A> acls)
Method for locating the member method that has given "unique" annotation. |
|
|
getClassAnnotation(java.lang.Class<A> acls)
|
|
AnnotatedClass |
getClassInfo()
|
|
protected boolean |
isCglibGetCallbacks(AnnotatedMethod am)
This method was added to address [JACKSON-53]: need to weed out CGLib-injected "getCallbacks". |
|
protected boolean |
isGroovyMeta(AnnotatedMethod am)
Similar to isCglibGetCallbacks(org.codehaus.jackson.map.introspect.AnnotatedMethod), need to suppress
a cyclic reference to resolve [JACKSON-103] |
|
protected boolean |
isIgnored(AnnotatedMethod am)
Helper method used to check whether given element (method, constructor, class) has enabled (active) instance of JsonIgnore annotation. |
|
protected java.lang.String |
mangleGetterName(Annotated a,
java.lang.String basename)
|
|
static java.lang.String |
manglePropertyName(java.lang.String basename)
Method called to figure out name of the property, given corresponding suggested name based on a method or field name. |
|
protected java.lang.String |
mangleSetterName(Annotated a,
java.lang.String basename)
|
|
protected java.lang.String |
okNameForGetter(AnnotatedMethod am)
|
|
protected java.lang.String |
okNameForSetter(AnnotatedMethod am)
|
|
boolean |
willWriteNullProperties(boolean defValue)
Method for determining whether null properties should be written out for a Bean of introspected type. |
|
| Methods inherited from class org.codehaus.jackson.map.BeanDescription |
|---|
getBeanClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicBeanDescription(java.lang.Class<?> forClass,
AnnotatedClass ac)
| Method Detail |
|---|
public AnnotatedClass getClassInfo()
public <A extends java.lang.annotation.Annotation> A getClassAnnotation(java.lang.Class<A> acls)
public AnnotatedMethod findMethod(java.lang.String name,
java.lang.Class<?>[] paramTypes)
public java.util.LinkedHashMap<java.lang.String,AnnotatedMethod> findGetters(boolean autodetect,
java.util.Collection<java.lang.String> ignoredProperties)
findGetters in class BeanDescriptionautodetect - Whether to use Bean naming convention to
automatically detect bean properties; if true will do that,
if false will require explicit annotations.ignoredProperties - (optional, may be null) Names of properties
to ignore; getters for these properties are not to be returned.
public AnnotatedMethod findJsonValue()
JsonValue annotation, if any. If multiple ones are found,
an error is reported by throwing IllegalArgumentException
public java.lang.reflect.Constructor<?> findDefaultConstructor()
public java.lang.reflect.Constructor<?> findSingleArgConstructor(java.lang.Class<?>... argTypes)
argTypes - Type(s) of the argument that we are looking forpublic java.lang.reflect.Method findFactoryMethod(java.lang.Class<?>... expArgTypes)
expArgTypes - Types that the matching single argument factory
method can take: will also accept super types of these types
(ie. arg just has to be assignable from expArgType)public java.util.LinkedHashMap<java.lang.String,AnnotatedMethod> findSetters(boolean autodetect)
findSetters in class BeanDescription
public AnnotatedMethod findAnySetter()
throws java.lang.IllegalArgumentException
JsonAnySetter. If no such method exists
null is returned. If more than one are found, an exception
is thrown.
Additional checks are also made to see that method signature
is acceptable: needs to take 2 arguments, first one String or
Object; second any can be any type.
java.lang.IllegalArgumentExceptionpublic boolean willWriteNullProperties(boolean defValue)
protected java.lang.String okNameForGetter(AnnotatedMethod am)
protected java.lang.String mangleGetterName(Annotated a,
java.lang.String basename)
protected boolean isCglibGetCallbacks(AnnotatedMethod am)
protected boolean isGroovyMeta(AnnotatedMethod am)
isCglibGetCallbacks(org.codehaus.jackson.map.introspect.AnnotatedMethod), need to suppress
a cyclic reference to resolve [JACKSON-103]
protected java.lang.String okNameForSetter(AnnotatedMethod am)
protected java.lang.String mangleSetterName(Annotated a,
java.lang.String basename)
protected <A extends java.lang.annotation.Annotation> AnnotatedMethod findUniqueMethodWith(java.lang.Class<A> acls)
protected boolean isIgnored(AnnotatedMethod am)
JsonIgnore annotation.
public static java.lang.String manglePropertyName(java.lang.String basename)
basename - Name of accessor/mutator method, not including prefix
("get"/"is"/"set")public static java.lang.String descFor(java.lang.reflect.AnnotatedElement elem)
Class or Method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||