1.1 --- a/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/api/Property.java Mon Feb 18 12:26:16 2013 +0100
1.2 +++ b/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/api/Property.java Fri Feb 22 08:59:40 2013 +0100
1.3 @@ -20,16 +20,36 @@
1.4 import java.lang.annotation.Retention;
1.5 import java.lang.annotation.RetentionPolicy;
1.6 import java.lang.annotation.Target;
1.7 +import java.util.List;
1.8
1.9 -/** Represents a property in a generated model of an HTML
1.10 - * {@link Page}.
1.11 +/** Represents a property. Either in a generated model of an HTML
1.12 + * {@link Page} or in a class defined by {@link Model}.
1.13 *
1.14 * @author Jaroslav Tulach <jtulach@netbeans.org>
1.15 */
1.16 @Retention(RetentionPolicy.SOURCE)
1.17 @Target({})
1.18 public @interface Property {
1.19 + /** Name of the property. Will be used to define proper getter and setter
1.20 + * in the associated class.
1.21 + *
1.22 + * @return valid java identifier
1.23 + */
1.24 String name();
1.25 +
1.26 + /** Type of the property. Can either be primitive type (like <code>int.class</code>,
1.27 + * <code>double.class</code>, etc.), {@link String} or complex model
1.28 + * class (defined by {@link Model} property).
1.29 + *
1.30 + * @return the class of the property
1.31 + */
1.32 Class<?> type();
1.33 +
1.34 + /** Is this property an array of the {@link #type()} or a single value?
1.35 + * If the property is an array, only its getter (returning mutable {@link List} of
1.36 + * the boxed {@link #type()}).
1.37 + *
1.38 + * @return true, if this is supposed to be an array of values.
1.39 + */
1.40 boolean array() default false;
1.41 }