wayward/Blueprint — Issue #5: Map custom configuration paths to methods
Author: wayward
Created: 2012-02-21 00:49:53+00:00
State: open

Methods are currently mapped to paths in the configuration in a fixed manner (by method name). Allow both:

– Overriding individual method's path, e.g. with an annotation: @Named("timeout") int getTimeout().
This poses a specific problem: paths with more than one component will need to be given either as arrays or as a string with delimiters. If using delimited strings, the delimiter must be appropriate for the configuration source, but this is a run-time concern and should not leak into the API. E.g. @Named("foo.bar.baz") is syntactically a 3-component path in Properties, but in XML it is a single tag name. Slashes ("/") would be appropriate for XML, but not necessarily for all other source types.

– Specifying the mapping strategy at creation time (one could be: build paths by stripping JavaBeans-style getter prefixes).