Builder API
Define components fluently in code
The Builder API lets you define your component system in code without properties files.
Example
final System system = System.builder()
.definition(Person.class, "jane")
.param("age", 37)
.comp("address", "home")
.definition(Address.class, "home")
.param("street", "820 Roosevelt Street")
.param("city", "River Falls")
.param("state", "WI")
.param("zipcode", "54022")
.build();
final Person person = system.get(Person.class);
API
definition(Class, name)— Declare a new component with the given class and nameparam(name, value)— Set a@Paramvalue on the current componentcomp(name, reference)— Set a@Componentreference on the current componentbuild()— Build theSystemand construct all components