net.java.html.json
Annotation Type Property


@Retention(value=SOURCE)
@Target(value={})
public @interface Property

Represents a property in a class defined with Model annotation.

Author:
Jaroslav Tulach

Required Element Summary
 String name
          Name of the property.
 Class<?> type
          Type of the property.
 
Optional Element Summary
 boolean array
          Is this property an array of the type() or a single value? If the property is an array, only its getter (returning mutable List of the boxed type()).
 

Element Detail

name

public abstract String name
Name of the property. Will be used to define proper getter and setter in the associated class.

Returns:
valid java identifier

type

public abstract Class<?> type
Type of the property. Can either be primitive type (like int.class, double.class, etc.), String, enum or complex model class (defined by Model property).

Returns:
the class of the property

array

public abstract boolean array
Is this property an array of the type() or a single value? If the property is an array, only its getter (returning mutable List of the boxed type()).

Returns:
true, if this is supposed to be an array of values.
Default:
false


Copyright © 2013 API Design. All Rights Reserved.