public static interface EnvironmentSettings.Builder
EnvironmentSettings| Modifier and Type | Method and Description |
|---|---|
EnvironmentSettings |
build()
Builds a new
EnvironmentSettings instance. |
EnvironmentSettings.Builder |
initScript(String path)
Defines the init script for the environment
|
EnvironmentSettings.Builder |
loadExecutor(ScriptLoadingExecutor executor)
Define the executor service used to setup task to poll scripts for
changes and load new scripts.
|
EnvironmentSettings.Builder |
mergeSettingsFrom(EnvironmentSettings other)
Applies the settings from the give instance to this builder
|
EnvironmentSettings.Builder |
pollRate(long time,
TimeUnit unit)
Define how often the script loader should poll scripts for updates
|
EnvironmentSettings.Builder |
runExecutor(Executor executor)
Define the executor used to run scripts
|
EnvironmentSettings.Builder |
withBindings(BindingsSupplier supplier)
Adds a bindings supplier to the settings
|
EnvironmentSettings.Builder |
withDefaultPackageImport(String packageName)
Marks that a
Package should be imported by default. |
EnvironmentSettings.Builder |
withDefaultPackageImports(Collection<String> packageNames)
Marks that
Packages should be imported by default. |
EnvironmentSettings.Builder |
withDefaultTypeImport(String type)
Marks that a
Class should be imported by default. |
EnvironmentSettings.Builder |
withDefaultTypeImports(Collection<String> types)
Marks that
Classes should be imported by default. |
EnvironmentSettings.Builder mergeSettingsFrom(EnvironmentSettings other)
other - the other settingsEnvironmentSettings.Builder loadExecutor(ScriptLoadingExecutor executor)
executor - the executorEnvironmentSettings.Builder runExecutor(Executor executor)
executor - the executorEnvironmentSettings.Builder withBindings(BindingsSupplier supplier)
supplier - the bindings supplierEnvironmentSettings.Builder withDefaultPackageImport(String packageName)
Package should be imported by default.packageName - the name of the package - see Package.getName().EnvironmentSettings.Builder withDefaultPackageImports(Collection<String> packageNames)
Packages should be imported by default.packageNames - the package names - see Package.getName().EnvironmentSettings.Builder withDefaultTypeImport(String type)
Class should be imported by default.type - the name of the class - see Class.getName()EnvironmentSettings.Builder withDefaultTypeImports(Collection<String> types)
Classes should be imported by default.types - class names - see Class.getName()EnvironmentSettings.Builder pollRate(long time, TimeUnit unit)
time - the timeunit - the unitEnvironmentSettings.Builder initScript(String path)
path - the pathEnvironmentSettings build()
EnvironmentSettings instance.Copyright © 2018. All rights reserved.