1 /** |
|
2 * SQL-DK |
|
3 * Copyright © 2015 František Kučera (frantovo.cz) |
|
4 * |
|
5 * This program is free software: you can redistribute it and/or modify |
|
6 * it under the terms of the GNU General Public License as published by |
|
7 * the Free Software Foundation, either version 3 of the License, or |
|
8 * (at your option) any later version. |
|
9 * |
|
10 * This program is distributed in the hope that it will be useful, |
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 * GNU General Public License for more details. |
|
14 * |
|
15 * You should have received a copy of the GNU General Public License |
|
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 */ |
|
18 package info.globalcode.sql.dk.configuration; |
|
19 |
|
20 import java.lang.annotation.ElementType; |
|
21 import java.lang.annotation.Repeatable; |
|
22 import java.lang.annotation.Retention; |
|
23 import static java.lang.annotation.RetentionPolicy.RUNTIME; |
|
24 import java.lang.annotation.Target; |
|
25 |
|
26 /** |
|
27 * Declaration of the (formatter) properties – for documentation purposes. |
|
28 * |
|
29 * TODO: automatically inject properties (configured, ad-hoc, default ones) to the formatters |
|
30 * |
|
31 * @author Ing. František Kučera (frantovo.cz) |
|
32 */ |
|
33 @Retention(RUNTIME) |
|
34 @Target({ElementType.TYPE}) |
|
35 @Repeatable(PropertyDeclarations.class) |
|
36 public @interface PropertyDeclaration { |
|
37 |
|
38 /** |
|
39 * @return name of the property |
|
40 */ |
|
41 String name(); |
|
42 |
|
43 /** |
|
44 * @return data type of the value: String, numbers, Boolean or Enum |
|
45 */ |
|
46 Class type(); |
|
47 |
|
48 /** |
|
49 * @return documentation for the users |
|
50 */ |
|
51 String description(); |
|
52 |
|
53 /** |
|
54 * @return default value of this property |
|
55 */ |
|
56 String defaultValue(); |
|
57 } |
|