01: package org.conform;
02:
03: import org.conform.FormatType;
04:
05: import java.lang.annotation.ElementType;
06: import java.lang.annotation.Retention;
07: import java.lang.annotation.RetentionPolicy;
08: import java.lang.annotation.Target;
09:
10: @Target({ElementType.FIELD})
11: @Retention(RetentionPolicy.RUNTIME)
12: public @interface Property {
13: /**
14: * @return "true", "false"
15: */
16: String mandatory() default "";
17:
18: /**
19: * @return "true", "false"
20: */
21: String readable() default "";
22:
23: /**
24: * @return "true", "false"
25: */
26: String writable() default "";
27:
28: /**
29: * @return "true", "false"
30: */
31: String applicable() default "";
32:
33: FormatType format() default FormatType.NONE;
34:
35: String formatClass() default "";
36:
37: /**
38: * @return pattern for the Format (usage depends on the FormatType).
39: */
40: String pattern() default "";
41:
42: /**
43: * @return key for looking up the pattern for the Format in the resource bundle (localized formatting)
44: */
45: String patternKey() default "";
46:
47: int scale() default -1;
48:
49: int precision() default -1;
50:
51: int length() default -1;
52:
53: /**
54: * @return properties can be ordered by priority
55: */
56: int priority() default -1;
57: }
|