-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTestConfig.java
95 lines (66 loc) · 2.15 KB
/
TestConfig.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
package github.hellocsl.sample;
import java.util.Set;
import github.hellocsl.simpleconfig.annotation.APPLY;
import github.hellocsl.simpleconfig.annotation.COMMIT;
import github.hellocsl.simpleconfig.annotation.CONFIG;
import github.hellocsl.simpleconfig.annotation.GET;
/**
* Created by chensuilun on 2017/6/12.
*/
@CONFIG(name = "Simple")
public interface TestConfig {
String TEST_KEY_INT = "HELLO_INT";
String TEST_KEY_LONG = "HELLO_LONG";
String TEST_KEY_FLOAT = "HELLO_FLOAT";
String TEST_KEY_BOOLEAN = "HELLO_BOOLEAN";
String TEST_KEY_STRING = "HELLO_STRING";
String TEST_KEY_SET = "HELLO_SET";
@GET(key = TEST_KEY_INT)
int getIndex(int def);
@GET(key = TEST_KEY_INT)
int getIndex();
@GET(key = TEST_KEY_BOOLEAN)
boolean getBoolean(boolean def);
@GET(key = TEST_KEY_BOOLEAN)
boolean getBoolean();
@GET(key = TEST_KEY_FLOAT)
float getFloat(float def);
@GET(key = TEST_KEY_FLOAT)
float getFloat();
@GET(key = TEST_KEY_LONG)
long getLong(long def);
@GET(key = TEST_KEY_LONG)
long getLong();
@GET(key = TEST_KEY_STRING)
String getString(String def);
@GET(key = TEST_KEY_STRING)
String getString();
@GET(key = TEST_KEY_SET)
Set<String> getSet(Set<String> def);
@GET(key = TEST_KEY_SET)
Set<String> getSet();
@APPLY(key = TEST_KEY_INT)
void applyIndex(int value);
@APPLY(key = TEST_KEY_BOOLEAN)
void applyBoolean(boolean value);
@APPLY(key = TEST_KEY_FLOAT)
void applyFloat(float value);
@APPLY(key = TEST_KEY_LONG)
void applyLong(long value);
@APPLY(key = TEST_KEY_STRING)
void applyString(String value);
@APPLY(key = TEST_KEY_SET)
void applySet(Set<String> value);
@COMMIT(key = TEST_KEY_INT)
boolean commitIndex(int value);
@COMMIT(key = TEST_KEY_BOOLEAN)
boolean commitBoolean(boolean value);
@COMMIT(key = TEST_KEY_FLOAT)
boolean commitFloat(float value);
@COMMIT(key = TEST_KEY_LONG)
boolean commitLong(long value);
@COMMIT(key = TEST_KEY_STRING)
boolean commitString(String value);
@COMMIT(key = TEST_KEY_SET)
boolean commitSet(Set<String> value);
}