@Retention(value=RUNTIME)
@Target(value={FIELD,PARAMETER})
public @interface Property
DataType) Can also be used on the parameters of
transaction functions
Example of using this annotation
// max 15 character string, a-z with spaces
@Property(schema = {"pattern", "^[a-zA-Z\\s]{0,15}$"})
private String text;
// How friendly is this on a scale of 1-5, 1 being formal, 5 being familiar
@Property(schema = {"minimum", "1", "maximum", "5"})
private int friendliness = 1;
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String[] |
schema
Allows each property to be defined a detail set of rules to determine the
valid types of this data.
|