net.sf.doolin.oxml.annotation
Annotation Type Collection


@Documented
@Retention(value=RUNTIME)
@Target(value={METHOD,TYPE})
public @interface Collection

The Collection annotation defines that a property is a potential collection of fixed values and those values must be collected while the OXML script is executed. Those values will be stored finally in the OXMLReaderOutput.getCollections() map. The Collection annotation must be associated with one of the setter or getter of the property to collect values from.

See Also:
PropertyOXMLAction, OXMLContext.collect(String, Object)

Optional Element Summary
 boolean beanName
          If true, the bean name, which contains the property, will added in the collection name.
 String[] collectedProperties
          List of properties to collect on an instance.
 String name
          Name of the collection.
 

beanName

public abstract boolean beanName
If true, the bean name, which contains the property, will added in the collection name. This property is only used for annotated properties.

Returns:
true if the bean name must be included in the collection name
Default:
false

collectedProperties

public abstract String[] collectedProperties
List of properties to collect on an instance. If empty (default), a toString() call is applied on the instance. This property is only used for annotated classes.

Returns:
List of property names
Default:
{}

name

public abstract String name
Name of the collection. Will default to the property name if not defined.

Returns:
the collection name
Default:
""


Copyright © 2011. All Rights Reserved.