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

aogail/java-properties

 
 

Repository files navigation

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

//
// Very early stages, this readme might not be up-to-date
//

== myapp.properties ==
host=www.google.com
port=80

public abstract class MyConfig {
  public abstract String getHost();
  public abstract int getPort();
  public URI getUri() {
    return URI.create("http://" + getHost() + ":" + getPort());
  }
}

Properties props = new Properties();
props.load(myapp.properties);
MyConfig config = JavaProperties.newInstance(props,MyConfig.class);

config.getHost(); // www.google.com

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

  • Java 100.0%