public class LenskitConfigDSL extends BindingDSL
BindingDSL with additional
methods available at the top level for configuring the LensKit configuration itself.| Modifier | Constructor and Description |
|---|---|
|
LenskitConfigDSL(ConfigurationLoader loader)
Construct a new delegate with an empty configuration.
|
protected |
LenskitConfigDSL(ConfigurationLoader loader,
LenskitConfiguration cfg)
Construct a new delegate.
|
| Modifier and Type | Method and Description |
|---|---|
LenskitConfiguration |
getConfig()
Get the LensKit configuration being configured.
|
ConfigurationLoader |
getConfigLoader()
Get the configuration loader associated with this DSL (used to power the
include(java.io.File)
method). |
void |
include(java.io.File file)
Include another configuration file.
|
void |
root(java.lang.Class<?> type)
Add a root type.
|
addComponent, at, at, at, at, at, at, bind, bind, bindAny, domain, getContext, include, include, include, matching, matching, prefDomain, set, within, within, within, within, within, withinaddComponent, in, in, in, wrapContextpublic LenskitConfigDSL(ConfigurationLoader loader)
protected LenskitConfigDSL(ConfigurationLoader loader, LenskitConfiguration cfg)
cfg - The context to configure.public LenskitConfiguration getConfig()
public ConfigurationLoader getConfigLoader()
include(java.io.File)
method).java.lang.IllegalStateException - if there is no associated loader.public void root(java.lang.Class<?> type)
type - The type to add.LenskitConfiguration.addRoot(Class)public void include(java.io.File file)
throws java.io.IOException,
RecommenderConfigurationException
BindingDSLinclude in class BindingDSLfile - The configuration file.java.io.IOException - if an error is thrown loading the script.RecommenderConfigurationException - if there is an error running the script.