Property Binder is a Java library that provides typed access to entries in properties files. It offers such access by allowing a programmer to provide it a Java interface whose methods represent the keys of the properties file. The methods can be annotated to indicate what property the method represents, what default value(s) it should assume if the property is not present, and what pattern separates the individual values of multi-valued properties.
Changes: The @ParsedAs annotation was added for Date-returning PICA methods. PICA methods that accept one or more arguments expect their property values to be string format specifiers as in String.format(). Arguments are substituted into the format specifier in order prior to the result’s conversion to the PICA method’s return type. The constructor of PropertyBinder that the static factory method calls is published, so as to afford those who would use Property Binder a seam for testing purposes. A zero-arg ctor was adding to SubstitutableProperties. A subtle change was made in SubstitutableProperties(Properties): the properties handed to the ctor become the "defaults" rather than hard-and-fast values. The PropertyBinder.bind(Properties) method was published. The PropertyBinder.bind(Map<String, String>) method was added. SubstitutableProperties.substitute() is now an instance method. The internals of Property Binder deal in SubstitutableProperties throughout now. The dependency on commons-io was removed. Internal repackaging and refactoring were done.
Tags: Java library
Licenses: MIT/X