public class ConfigHelpers
extends java.lang.Object
Constructor and Description |
---|
ConfigHelpers() |
Modifier and Type | Method and Description |
---|---|
static void |
configure(LenskitConfiguration config,
groovy.lang.Closure<?> block)
Modify a configuration from a closure.
|
static LenskitConfiguration |
load(groovy.lang.Closure<?> block)
Load a LensKit configuration from a Groovy closure.
|
static LenskitConfiguration |
load(java.io.File script)
Load a LensKit configuration from a script file.
|
static LenskitConfiguration |
load(java.lang.String script)
Deprecated.
Loading from Groovy source strings is confusing.
|
static LenskitConfiguration |
load(java.net.URL script)
Load a LensKit configuration from a script URL.
|
public static LenskitConfiguration load(groovy.lang.Closure<?> block) throws RecommenderConfigurationException
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
ConfigurationLoader.load(groovy.lang.Closure)
@Deprecated public static LenskitConfiguration load(java.lang.String script) throws RecommenderConfigurationException
script
- The script source text to evaluate.RecommenderConfigurationException
public static LenskitConfiguration load(java.io.File script) throws java.io.IOException, RecommenderConfigurationException
script
- The script source file to evaluate.java.io.IOException
RecommenderConfigurationException
public static LenskitConfiguration load(java.net.URL script) throws java.io.IOException, RecommenderConfigurationException
script
- The script source URL to evaluate.java.io.IOException
RecommenderConfigurationException
public static void configure(LenskitConfiguration config, @Nonnull groovy.lang.Closure<?> block) throws RecommenderConfigurationException
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