suspend0/java-properties
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
== == == == == == == == == == == == == == == == == == == == == == == 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.