wayward / blueprint Goto Github PK
View Code? Open in Web Editor NEWType-safe configurations for Java.
License: Other
Type-safe configurations for Java.
License: Other
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).
Methods inherited from child interfaces aren't mapped onto configuration keys. They should be.
Have a configuration source provider that parses command line arguments in some canonical form (e.g. -n|--name[=value]).
Sub-interface methods are instantiated even if the corresponding configuration key is missing. Find a way to signal to the user that there is nothing interesting under them (return null?) Make sure it doesn't play foul with validations and default values.
JSON, YAML, JDBC, … (most likely depends on #11)
Let the programmer specify custom deserializers for types not supported out-of-the-box.
Blueprint talks about "validation" in three different contexts:
These three levels of validation need to be disentangled and offered as a choice to the user (with reasonable defaults).
Rework Source to expose a tree-like structure (node: { name, value, children }).
This will help write new Source impl's more easily.
Each proxy object is associated with a node in the configuration tree, but it can only access subnodes by name.
Provide proxy objects with an interface to:
– obtain the value associated with the current node ("here" value);
– collect all unclaimed keys in the current node ("&rest" map).
Updating and saving configuration objects for supported sources (e.g. readable files; not available for system properties, environment variables, etc.)
Allow attaching default values to methods. Specify the behavior when both default value and validation constraint(s) are given.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.