|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface FieldAnnotation
This Annotation can be used to describe the properties of the
JavaObjects that you would use for JSON binding.
FieldAnnotation
is a Method annotation and can be use
only for Method.
If you don't use the EntityAnnotation
for the "container" Bean,
all of used FieldAnnotation
will be ignored
and there will be a mirror binding between json and bean.
Required Element Summary | |
---|---|
java.lang.String |
name
This is the name of the property of the correspondent JSONObject. |
Optional Element Summary | |
---|---|
java.lang.Class<?> |
collectionType
If the property is an array, or collection, or set, you can use "collectionType". |
java.lang.Class<?> |
converter
With converter you can specify a particular Converter
implementation for the property. |
java.lang.Class<?> |
factory
With factory you can specify a particular it.dangelo.javabinding.factory.BindingFactory implementation for the property. |
java.lang.String |
getter
With getter you can specify a getter with different name respect to property. |
java.lang.String |
property
You can initialize property, if you want use different name for JSONObject attribute name if is different the Bean property name. |
java.lang.String |
refId
If the property is another bean, you should initialize refId with the id of the bean that you should have described. |
java.lang.String |
setter
Setter have to functions: 1) You can specify a setter with different name respect to property. |
java.lang.Class<?> |
type
This is the Class of the property. |
Element Detail |
---|
public abstract java.lang.String name
public abstract java.lang.Class<?> type
Class
of the property.
It's mandatory.
public abstract java.lang.String property
public abstract java.lang.String refId
public abstract java.lang.Class<?> collectionType
public abstract java.lang.Class<?> factory
public abstract java.lang.Class<?> converter
Converter
implementation for the property.
You have to initialize it with the Class of your converter
(for example MyConverter.class)
It's optional
public abstract java.lang.String setter
public abstract java.lang.String getter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |