Skip to content

Type safe wrappers for java.util.Properties and java.util.ResourceBundle

License

Notifications You must be signed in to change notification settings

suspend0/java-properties

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.

About

Type safe wrappers for java.util.Properties and java.util.ResourceBundle

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages