public class ConfigurationLoader extends Object
Constructor and Description |
---|
ConfigurationLoader()
Construct a new configuration loader.
|
ConfigurationLoader(ClassLoader loader)
Construct a new configuration loader.
|
Modifier and Type | Method and Description |
---|---|
ClassDirectory |
getDirectory() |
LenskitConfiguration |
load(groovy.lang.Closure<?> block)
Deprecated.
Use
ConfigHelpers.load(groovy.lang.Closure) instead. |
LenskitConfiguration |
load(File file)
Load a configuration from a file.
|
LenskitConfiguration |
load(String source)
Deprecated.
Loading from Groovy sources as strings is confusing.
|
LenskitConfiguration |
load(URL url)
Load a configuration from a URL.
|
LenskitConfigScript |
loadScript(File file)
Load a configuration script from a file.
|
LenskitConfigScript |
loadScript(String source)
Load a configuration script from a script source.
|
LenskitConfigScript |
loadScript(URL url)
Load a configuration script from a URL.
|
public ConfigurationLoader()
public ConfigurationLoader(ClassLoader loader)
loader
- The class loader to use.public ClassDirectory getDirectory()
public LenskitConfiguration load(@Nonnull File file) throws IOException, RecommenderConfigurationException
file
- The configuration script to load.IOException
RecommenderConfigurationException
public LenskitConfiguration load(@Nonnull URL url) throws IOException, RecommenderConfigurationException
url
- The configuration script to load.IOException
RecommenderConfigurationException
@Deprecated public LenskitConfiguration load(@Nonnull String source) throws RecommenderConfigurationException
source
- The configuration script to load.RecommenderConfigurationException
public LenskitConfigScript loadScript(@Nonnull File file) throws IOException, RecommenderConfigurationException
file
- The configuration script to load.IOException
RecommenderConfigurationException
public LenskitConfigScript loadScript(@Nonnull URL url) throws IOException, RecommenderConfigurationException
url
- The configuration script to load.IOException
RecommenderConfigurationException
public LenskitConfigScript loadScript(@Nonnull String source) throws RecommenderConfigurationException
source
- The configuration script to load.RecommenderConfigurationException
@Deprecated public LenskitConfiguration load(@Nonnull groovy.lang.Closure<?> block) throws RecommenderConfigurationException
ConfigHelpers.load(groovy.lang.Closure)
instead.block
- The block to evaluate. This block will be evaluated with a delegate providing
the LensKit DSL and the Closure.DELEGATE_FIRST
resolution strategy.RecommenderConfigurationException