Type safe wrappers for java.util.Properties and java.util.ResourceBundle
Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
lib
src/ca/hullabaloo/properties
test/ca/hullabaloo/properties
.gitignore
COPYING
README
java-properties.iml

README

== == == == == == == == == == == == == == == == == == == == == == 
== 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.