Class ImmutableJasmineConfiguration.Builder
- java.lang.Object
-
- com.github.searls.jasmine.config.ImmutableJasmineConfiguration.Builder
-
- Enclosing class:
- ImmutableJasmineConfiguration
@NotThreadSafe public static final class ImmutableJasmineConfiguration.Builder extends Object
Builds instances of typeImmutableJasmineConfiguration. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder from(JasmineConfiguration instance)
Fill a builder with attribute values from the providedJasmineConfigurationinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
basedir
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder basedir(File basedir)
Initializes the value for thebasedirattribute.- Parameters:
basedir- The value for basedir- Returns:
thisbuilder for use in a chained invocation
-
jasmineTargetDir
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder jasmineTargetDir(File jasmineTargetDir)
Initializes the value for thejasmineTargetDirattribute.- Parameters:
jasmineTargetDir- The value for jasmineTargetDir- Returns:
thisbuilder for use in a chained invocation
-
srcDirectoryName
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder srcDirectoryName(String srcDirectoryName)
Initializes the value for thesrcDirectoryNameattribute.If not set, this attribute will have a default value as returned by the initializer of
srcDirectoryName.- Parameters:
srcDirectoryName- The value for srcDirectoryName- Returns:
thisbuilder for use in a chained invocation
-
specDirectoryName
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder specDirectoryName(String specDirectoryName)
Initializes the value for thespecDirectoryNameattribute.If not set, this attribute will have a default value as returned by the initializer of
specDirectoryName.- Parameters:
specDirectoryName- The value for specDirectoryName- Returns:
thisbuilder for use in a chained invocation
-
sources
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder sources(ScriptSearch sources)
Initializes the value for thesourcesattribute.- Parameters:
sources- The value for sources- Returns:
thisbuilder for use in a chained invocation
-
specs
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder specs(ScriptSearch specs)
Initializes the value for thespecsattribute.- Parameters:
specs- The value for specs- Returns:
thisbuilder for use in a chained invocation
-
addContexts
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder addContexts(Context element)
Adds one element tocontextslist.- Parameters:
element- A contexts element- Returns:
thisbuilder for use in a chained invocation
-
addContexts
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder addContexts(Context... elements)
Adds elements tocontextslist.- Parameters:
elements- An array of contexts elements- Returns:
thisbuilder for use in a chained invocation
-
contexts
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder contexts(Iterable<? extends Context> elements)
Sets or replaces all elements forcontextslist.- Parameters:
elements- An iterable of contexts elements- Returns:
thisbuilder for use in a chained invocation
-
addAllContexts
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder addAllContexts(Iterable<? extends Context> elements)
Adds elements tocontextslist.- Parameters:
elements- An iterable of contexts elements- Returns:
thisbuilder for use in a chained invocation
-
addPreloadSources
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder addPreloadSources(String element)
Adds one element topreloadSourceslist.- Parameters:
element- A preloadSources element- Returns:
thisbuilder for use in a chained invocation
-
addPreloadSources
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder addPreloadSources(String... elements)
Adds elements topreloadSourceslist.- Parameters:
elements- An array of preloadSources elements- Returns:
thisbuilder for use in a chained invocation
-
preloadSources
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder preloadSources(Iterable<String> elements)
Sets or replaces all elements forpreloadSourceslist.- Parameters:
elements- An iterable of preloadSources elements- Returns:
thisbuilder for use in a chained invocation
-
addAllPreloadSources
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder addAllPreloadSources(Iterable<String> elements)
Adds elements topreloadSourceslist.- Parameters:
elements- An iterable of preloadSources elements- Returns:
thisbuilder for use in a chained invocation
-
sourceEncoding
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder sourceEncoding(String sourceEncoding)
Initializes the value for thesourceEncodingattribute.If not set, this attribute will have a default value as returned by the initializer of
sourceEncoding.- Parameters:
sourceEncoding- The value for sourceEncoding- Returns:
thisbuilder for use in a chained invocation
-
specRunnerTemplate
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder specRunnerTemplate(SpecRunnerTemplate specRunnerTemplate)
Initializes the value for thespecRunnerTemplateattribute.If not set, this attribute will have a default value as returned by the initializer of
specRunnerTemplate.- Parameters:
specRunnerTemplate- The value for specRunnerTemplate- Returns:
thisbuilder for use in a chained invocation
-
customRunnerTemplate
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder customRunnerTemplate(File customRunnerTemplate)
Initializes the optional valuecustomRunnerTemplateto customRunnerTemplate.- Parameters:
customRunnerTemplate- The value for customRunnerTemplate- Returns:
thisbuilder for chained invocation
-
customRunnerTemplate
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder customRunnerTemplate(Optional<? extends File> customRunnerTemplate)
Initializes the optional valuecustomRunnerTemplateto customRunnerTemplate.- Parameters:
customRunnerTemplate- The value for customRunnerTemplate- Returns:
thisbuilder for use in a chained invocation
-
customRunnerConfiguration
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder customRunnerConfiguration(File customRunnerConfiguration)
Initializes the optional valuecustomRunnerConfigurationto customRunnerConfiguration.- Parameters:
customRunnerConfiguration- The value for customRunnerConfiguration- Returns:
thisbuilder for chained invocation
-
customRunnerConfiguration
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder customRunnerConfiguration(Optional<? extends File> customRunnerConfiguration)
Initializes the optional valuecustomRunnerConfigurationto customRunnerConfiguration.- Parameters:
customRunnerConfiguration- The value for customRunnerConfiguration- Returns:
thisbuilder for use in a chained invocation
-
specRunnerHtmlFileName
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder specRunnerHtmlFileName(String specRunnerHtmlFileName)
Initializes the value for thespecRunnerHtmlFileNameattribute.If not set, this attribute will have a default value as returned by the initializer of
specRunnerHtmlFileName.- Parameters:
specRunnerHtmlFileName- The value for specRunnerHtmlFileName- Returns:
thisbuilder for use in a chained invocation
-
reporterType
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder reporterType(ReporterType reporterType)
Initializes the value for thereporterTypeattribute.If not set, this attribute will have a default value as returned by the initializer of
reporterType.- Parameters:
reporterType- The value for reporterType- Returns:
thisbuilder for use in a chained invocation
-
addReporters
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder addReporters(Reporter element)
Adds one element toreporterslist.- Parameters:
element- A reporters element- Returns:
thisbuilder for use in a chained invocation
-
addReporters
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder addReporters(Reporter... elements)
Adds elements toreporterslist.- Parameters:
elements- An array of reporters elements- Returns:
thisbuilder for use in a chained invocation
-
reporters
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder reporters(Iterable<? extends Reporter> elements)
Sets or replaces all elements forreporterslist.- Parameters:
elements- An iterable of reporters elements- Returns:
thisbuilder for use in a chained invocation
-
addAllReporters
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder addAllReporters(Iterable<? extends Reporter> elements)
Adds elements toreporterslist.- Parameters:
elements- An iterable of reporters elements- Returns:
thisbuilder for use in a chained invocation
-
addFileSystemReporters
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder addFileSystemReporters(FileSystemReporter element)
Adds one element tofileSystemReporterslist.- Parameters:
element- A fileSystemReporters element- Returns:
thisbuilder for use in a chained invocation
-
addFileSystemReporters
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder addFileSystemReporters(FileSystemReporter... elements)
Adds elements tofileSystemReporterslist.- Parameters:
elements- An array of fileSystemReporters elements- Returns:
thisbuilder for use in a chained invocation
-
fileSystemReporters
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder fileSystemReporters(Iterable<? extends FileSystemReporter> elements)
Sets or replaces all elements forfileSystemReporterslist.- Parameters:
elements- An iterable of fileSystemReporters elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFileSystemReporters
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder addAllFileSystemReporters(Iterable<? extends FileSystemReporter> elements)
Adds elements tofileSystemReporterslist.- Parameters:
elements- An iterable of fileSystemReporters elements- Returns:
thisbuilder for use in a chained invocation
-
autoRefreshInterval
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder autoRefreshInterval(int autoRefreshInterval)
Initializes the value for theautoRefreshIntervalattribute.If not set, this attribute will have a default value as returned by the initializer of
autoRefreshInterval.- Parameters:
autoRefreshInterval- The value for autoRefreshInterval- Returns:
thisbuilder for use in a chained invocation
-
projectClassLoader
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder projectClassLoader(ClassLoader projectClassLoader)
Initializes the value for theprojectClassLoaderattribute.If not set, this attribute will have a default value as returned by the initializer of
projectClassLoader.- Parameters:
projectClassLoader- The value for projectClassLoader- Returns:
thisbuilder for use in a chained invocation
-
debug
@CanIgnoreReturnValue public final ImmutableJasmineConfiguration.Builder debug(boolean debug)
Initializes the value for thedebugattribute.- Parameters:
debug- The value for debug- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableJasmineConfiguration build()
Builds a newImmutableJasmineConfiguration.- Returns:
- An immutable instance of JasmineConfiguration
- Throws:
IllegalStateException- if any required attributes are missing
-
-