-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathREADME
More file actions
25 lines (17 loc) · 714 Bytes
/
README
File metadata and controls
25 lines (17 loc) · 714 Bytes
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
== == == == == == == == == == == == == == == == == == == == == ==
== Type-safe wrappers for java.util.Properties and java.util.ResourceBundle.
== == == == == == == == == == == == == == == == == == == == == ==
If you have a properties file like
host=www.google.com
port=80
and an interface
public interface MyConfig {
public String getHost();
public int getPort();
}
Then you can "bind" the two together. JavaProperties will do the
magic so MyConfig.getPort() returns 80;
MyConfig config = JavaProperties.bind(MyConfig.class, props);
config.getPort(); // return 80
Supported return types are all the basic number types and their
wrappers, all enums and arrays of same, plus String.