Package com.github.searls.jasmine.config
Class ImmutableJasmineConfiguration
- java.lang.Object
-
- com.github.searls.jasmine.config.JasmineConfiguration
-
- com.github.searls.jasmine.config.ImmutableJasmineConfiguration
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableJasmineConfiguration extends JasmineConfiguration
Immutable implementation ofJasmineConfiguration.Use the builder to create immutable instances:
ImmutableJasmineConfiguration.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableJasmineConfiguration.BuilderBuilds instances of typeImmutableJasmineConfiguration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableJasmineConfiguration.Builderbuilder()Creates a builder forImmutableJasmineConfiguration.static ImmutableJasmineConfigurationcopyOf(JasmineConfiguration instance)Creates an immutable copy of aJasmineConfigurationvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableJasmineConfigurationthat have equal attribute values.intgetAutoRefreshInterval()FilegetBasedir()List<Context>getContexts()Optional<File>getCustomRunnerConfiguration()Optional<File>getCustomRunnerTemplate()List<FileSystemReporter>getFileSystemReporters()FilegetJasmineTargetDir()List<String>getPreloadSources()ClassLoadergetProjectClassLoader()List<Reporter>getReporters()ReporterTypegetReporterType()StringgetSourceEncoding()ScriptSearchgetSources()StringgetSpecDirectoryName()StringgetSpecRunnerHtmlFileName()SpecRunnerTemplategetSpecRunnerTemplate()ScriptSearchgetSpecs()StringgetSrcDirectoryName()inthashCode()Computes a hash code from attributes:basedir,jasmineTargetDir,srcDirectoryName,specDirectoryName,sources,specs,contexts,preloadSources,sourceEncoding,specRunnerTemplate,customRunnerTemplate,customRunnerConfiguration,specRunnerHtmlFileName,reporterType,reporters,fileSystemReporters,autoRefreshInterval,projectClassLoader,debug.booleanisDebug()StringtoString()Prints the immutable valueJasmineConfigurationwith attribute values.ImmutableJasmineConfigurationwithAutoRefreshInterval(int value)Copy the current immutable object by setting a value for theautoRefreshIntervalattribute.ImmutableJasmineConfigurationwithBasedir(File value)Copy the current immutable object by setting a value for thebasedirattribute.ImmutableJasmineConfigurationwithContexts(Context... elements)Copy the current immutable object with elements that replace the content ofcontexts.ImmutableJasmineConfigurationwithContexts(Iterable<? extends Context> elements)Copy the current immutable object with elements that replace the content ofcontexts.ImmutableJasmineConfigurationwithCustomRunnerConfiguration(File value)Copy the current immutable object by setting a present value for the optionalcustomRunnerConfigurationattribute.ImmutableJasmineConfigurationwithCustomRunnerConfiguration(Optional<? extends File> optional)Copy the current immutable object by setting an optional value for thecustomRunnerConfigurationattribute.ImmutableJasmineConfigurationwithCustomRunnerTemplate(File value)Copy the current immutable object by setting a present value for the optionalcustomRunnerTemplateattribute.ImmutableJasmineConfigurationwithCustomRunnerTemplate(Optional<? extends File> optional)Copy the current immutable object by setting an optional value for thecustomRunnerTemplateattribute.ImmutableJasmineConfigurationwithDebug(boolean value)Copy the current immutable object by setting a value for thedebugattribute.ImmutableJasmineConfigurationwithFileSystemReporters(FileSystemReporter... elements)Copy the current immutable object with elements that replace the content offileSystemReporters.ImmutableJasmineConfigurationwithFileSystemReporters(Iterable<? extends FileSystemReporter> elements)Copy the current immutable object with elements that replace the content offileSystemReporters.ImmutableJasmineConfigurationwithJasmineTargetDir(File value)Copy the current immutable object by setting a value for thejasmineTargetDirattribute.ImmutableJasmineConfigurationwithPreloadSources(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofpreloadSources.ImmutableJasmineConfigurationwithPreloadSources(String... elements)Copy the current immutable object with elements that replace the content ofpreloadSources.ImmutableJasmineConfigurationwithProjectClassLoader(ClassLoader value)Copy the current immutable object by setting a value for theprojectClassLoaderattribute.ImmutableJasmineConfigurationwithReporters(Reporter... elements)Copy the current immutable object with elements that replace the content ofreporters.ImmutableJasmineConfigurationwithReporters(Iterable<? extends Reporter> elements)Copy the current immutable object with elements that replace the content ofreporters.ImmutableJasmineConfigurationwithReporterType(ReporterType value)Copy the current immutable object by setting a value for thereporterTypeattribute.ImmutableJasmineConfigurationwithSourceEncoding(String value)Copy the current immutable object by setting a value for thesourceEncodingattribute.ImmutableJasmineConfigurationwithSources(ScriptSearch value)Copy the current immutable object by setting a value for thesourcesattribute.ImmutableJasmineConfigurationwithSpecDirectoryName(String value)Copy the current immutable object by setting a value for thespecDirectoryNameattribute.ImmutableJasmineConfigurationwithSpecRunnerHtmlFileName(String value)Copy the current immutable object by setting a value for thespecRunnerHtmlFileNameattribute.ImmutableJasmineConfigurationwithSpecRunnerTemplate(SpecRunnerTemplate value)Copy the current immutable object by setting a value for thespecRunnerTemplateattribute.ImmutableJasmineConfigurationwithSpecs(ScriptSearch value)Copy the current immutable object by setting a value for thespecsattribute.ImmutableJasmineConfigurationwithSrcDirectoryName(String value)Copy the current immutable object by setting a value for thesrcDirectoryNameattribute.
-
-
-
Method Detail
-
getBasedir
public File getBasedir()
- Specified by:
getBasedirin classJasmineConfiguration- Returns:
- The value of the
basedirattribute
-
getJasmineTargetDir
public File getJasmineTargetDir()
- Specified by:
getJasmineTargetDirin classJasmineConfiguration- Returns:
- The value of the
jasmineTargetDirattribute
-
getSrcDirectoryName
public String getSrcDirectoryName()
- Overrides:
getSrcDirectoryNamein classJasmineConfiguration- Returns:
- The value of the
srcDirectoryNameattribute
-
getSpecDirectoryName
public String getSpecDirectoryName()
- Overrides:
getSpecDirectoryNamein classJasmineConfiguration- Returns:
- The value of the
specDirectoryNameattribute
-
getSources
public ScriptSearch getSources()
- Specified by:
getSourcesin classJasmineConfiguration- Returns:
- The value of the
sourcesattribute
-
getSpecs
public ScriptSearch getSpecs()
- Specified by:
getSpecsin classJasmineConfiguration- Returns:
- The value of the
specsattribute
-
getContexts
public List<Context> getContexts()
- Specified by:
getContextsin classJasmineConfiguration- Returns:
- The value of the
contextsattribute
-
getPreloadSources
public List<String> getPreloadSources()
- Specified by:
getPreloadSourcesin classJasmineConfiguration- Returns:
- The value of the
preloadSourcesattribute
-
getSourceEncoding
public String getSourceEncoding()
- Overrides:
getSourceEncodingin classJasmineConfiguration- Returns:
- The value of the
sourceEncodingattribute
-
getSpecRunnerTemplate
public SpecRunnerTemplate getSpecRunnerTemplate()
- Overrides:
getSpecRunnerTemplatein classJasmineConfiguration- Returns:
- The value of the
specRunnerTemplateattribute
-
getCustomRunnerTemplate
public Optional<File> getCustomRunnerTemplate()
- Specified by:
getCustomRunnerTemplatein classJasmineConfiguration- Returns:
- The value of the
customRunnerTemplateattribute
-
getCustomRunnerConfiguration
public Optional<File> getCustomRunnerConfiguration()
- Specified by:
getCustomRunnerConfigurationin classJasmineConfiguration- Returns:
- The value of the
customRunnerConfigurationattribute
-
getSpecRunnerHtmlFileName
public String getSpecRunnerHtmlFileName()
- Overrides:
getSpecRunnerHtmlFileNamein classJasmineConfiguration- Returns:
- The value of the
specRunnerHtmlFileNameattribute
-
getReporterType
public ReporterType getReporterType()
- Overrides:
getReporterTypein classJasmineConfiguration- Returns:
- The value of the
reporterTypeattribute
-
getReporters
public List<Reporter> getReporters()
- Overrides:
getReportersin classJasmineConfiguration- Returns:
- The value of the
reportersattribute
-
getFileSystemReporters
public List<FileSystemReporter> getFileSystemReporters()
- Overrides:
getFileSystemReportersin classJasmineConfiguration- Returns:
- The value of the
fileSystemReportersattribute
-
getAutoRefreshInterval
public int getAutoRefreshInterval()
- Overrides:
getAutoRefreshIntervalin classJasmineConfiguration- Returns:
- The value of the
autoRefreshIntervalattribute
-
getProjectClassLoader
public ClassLoader getProjectClassLoader()
- Overrides:
getProjectClassLoaderin classJasmineConfiguration- Returns:
- The value of the
projectClassLoaderattribute
-
isDebug
public boolean isDebug()
- Specified by:
isDebugin classJasmineConfiguration- Returns:
- The value of the
debugattribute
-
withBasedir
public final ImmutableJasmineConfiguration withBasedir(File value)
Copy the current immutable object by setting a value for thebasedirattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for basedir- Returns:
- A modified copy of the
thisobject
-
withJasmineTargetDir
public final ImmutableJasmineConfiguration withJasmineTargetDir(File value)
Copy the current immutable object by setting a value for thejasmineTargetDirattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for jasmineTargetDir- Returns:
- A modified copy of the
thisobject
-
withSrcDirectoryName
public final ImmutableJasmineConfiguration withSrcDirectoryName(String value)
Copy the current immutable object by setting a value for thesrcDirectoryNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for srcDirectoryName- Returns:
- A modified copy of the
thisobject
-
withSpecDirectoryName
public final ImmutableJasmineConfiguration withSpecDirectoryName(String value)
Copy the current immutable object by setting a value for thespecDirectoryNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for specDirectoryName- Returns:
- A modified copy of the
thisobject
-
withSources
public final ImmutableJasmineConfiguration withSources(ScriptSearch value)
Copy the current immutable object by setting a value for thesourcesattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sources- Returns:
- A modified copy of the
thisobject
-
withSpecs
public final ImmutableJasmineConfiguration withSpecs(ScriptSearch value)
Copy the current immutable object by setting a value for thespecsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for specs- Returns:
- A modified copy of the
thisobject
-
withContexts
public final ImmutableJasmineConfiguration withContexts(Context... elements)
Copy the current immutable object with elements that replace the content ofcontexts.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withContexts
public final ImmutableJasmineConfiguration withContexts(Iterable<? extends Context> elements)
Copy the current immutable object with elements that replace the content ofcontexts. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of contexts elements to set- Returns:
- A modified copy of
thisobject
-
withPreloadSources
public final ImmutableJasmineConfiguration withPreloadSources(String... elements)
Copy the current immutable object with elements that replace the content ofpreloadSources.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPreloadSources
public final ImmutableJasmineConfiguration withPreloadSources(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofpreloadSources. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of preloadSources elements to set- Returns:
- A modified copy of
thisobject
-
withSourceEncoding
public final ImmutableJasmineConfiguration withSourceEncoding(String value)
Copy the current immutable object by setting a value for thesourceEncodingattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sourceEncoding- Returns:
- A modified copy of the
thisobject
-
withSpecRunnerTemplate
public final ImmutableJasmineConfiguration withSpecRunnerTemplate(SpecRunnerTemplate value)
Copy the current immutable object by setting a value for thespecRunnerTemplateattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for specRunnerTemplate- Returns:
- A modified copy of the
thisobject
-
withCustomRunnerTemplate
public final ImmutableJasmineConfiguration withCustomRunnerTemplate(File value)
Copy the current immutable object by setting a present value for the optionalcustomRunnerTemplateattribute.- Parameters:
value- The value for customRunnerTemplate- Returns:
- A modified copy of
thisobject
-
withCustomRunnerTemplate
public final ImmutableJasmineConfiguration withCustomRunnerTemplate(Optional<? extends File> optional)
Copy the current immutable object by setting an optional value for thecustomRunnerTemplateattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for customRunnerTemplate- Returns:
- A modified copy of
thisobject
-
withCustomRunnerConfiguration
public final ImmutableJasmineConfiguration withCustomRunnerConfiguration(File value)
Copy the current immutable object by setting a present value for the optionalcustomRunnerConfigurationattribute.- Parameters:
value- The value for customRunnerConfiguration- Returns:
- A modified copy of
thisobject
-
withCustomRunnerConfiguration
public final ImmutableJasmineConfiguration withCustomRunnerConfiguration(Optional<? extends File> optional)
Copy the current immutable object by setting an optional value for thecustomRunnerConfigurationattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for customRunnerConfiguration- Returns:
- A modified copy of
thisobject
-
withSpecRunnerHtmlFileName
public final ImmutableJasmineConfiguration withSpecRunnerHtmlFileName(String value)
Copy the current immutable object by setting a value for thespecRunnerHtmlFileNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for specRunnerHtmlFileName- Returns:
- A modified copy of the
thisobject
-
withReporterType
public final ImmutableJasmineConfiguration withReporterType(ReporterType value)
Copy the current immutable object by setting a value for thereporterTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for reporterType- Returns:
- A modified copy of the
thisobject
-
withReporters
public final ImmutableJasmineConfiguration withReporters(Reporter... elements)
Copy the current immutable object with elements that replace the content ofreporters.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withReporters
public final ImmutableJasmineConfiguration withReporters(Iterable<? extends Reporter> elements)
Copy the current immutable object with elements that replace the content ofreporters. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of reporters elements to set- Returns:
- A modified copy of
thisobject
-
withFileSystemReporters
public final ImmutableJasmineConfiguration withFileSystemReporters(FileSystemReporter... elements)
Copy the current immutable object with elements that replace the content offileSystemReporters.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withFileSystemReporters
public final ImmutableJasmineConfiguration withFileSystemReporters(Iterable<? extends FileSystemReporter> elements)
Copy the current immutable object with elements that replace the content offileSystemReporters. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of fileSystemReporters elements to set- Returns:
- A modified copy of
thisobject
-
withAutoRefreshInterval
public final ImmutableJasmineConfiguration withAutoRefreshInterval(int value)
Copy the current immutable object by setting a value for theautoRefreshIntervalattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for autoRefreshInterval- Returns:
- A modified copy of the
thisobject
-
withProjectClassLoader
public final ImmutableJasmineConfiguration withProjectClassLoader(ClassLoader value)
Copy the current immutable object by setting a value for theprojectClassLoaderattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for projectClassLoader- Returns:
- A modified copy of the
thisobject
-
withDebug
public final ImmutableJasmineConfiguration withDebug(boolean value)
Copy the current immutable object by setting a value for thedebugattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for debug- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableJasmineConfigurationthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:basedir,jasmineTargetDir,srcDirectoryName,specDirectoryName,sources,specs,contexts,preloadSources,sourceEncoding,specRunnerTemplate,customRunnerTemplate,customRunnerConfiguration,specRunnerHtmlFileName,reporterType,reporters,fileSystemReporters,autoRefreshInterval,projectClassLoader,debug.
-
toString
public String toString()
Prints the immutable valueJasmineConfigurationwith attribute values.
-
copyOf
public static ImmutableJasmineConfiguration copyOf(JasmineConfiguration instance)
Creates an immutable copy of aJasmineConfigurationvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable JasmineConfiguration instance
-
builder
public static ImmutableJasmineConfiguration.Builder builder()
Creates a builder forImmutableJasmineConfiguration.ImmutableJasmineConfiguration.builder() .basedir(java.io.File) // requiredbasedir.jasmineTargetDir(java.io.File) // requiredjasmineTargetDir.srcDirectoryName(String) // optionalsrcDirectoryName.specDirectoryName(String) // optionalspecDirectoryName.sources(com.github.searls.jasmine.model.ScriptSearch) // requiredsources.specs(com.github.searls.jasmine.model.ScriptSearch) // requiredspecs.addContexts|addAllContexts(com.github.searls.jasmine.mojo.Context) //contextselements .addPreloadSources|addAllPreloadSources(String) //preloadSourceselements .sourceEncoding(String) // optionalsourceEncoding.specRunnerTemplate(com.github.searls.jasmine.runner.SpecRunnerTemplate) // optionalspecRunnerTemplate.customRunnerTemplate(java.io.File) // optionalcustomRunnerTemplate.customRunnerConfiguration(java.io.File) // optionalcustomRunnerConfiguration.specRunnerHtmlFileName(String) // optionalspecRunnerHtmlFileName.reporterType(com.github.searls.jasmine.runner.ReporterType) // optionalreporterType.addReporters|addAllReporters(com.github.searls.jasmine.model.Reporter) //reporterselements .addFileSystemReporters|addAllFileSystemReporters(com.github.searls.jasmine.model.FileSystemReporter) //fileSystemReporterselements .autoRefreshInterval(int) // optionalautoRefreshInterval.projectClassLoader(ClassLoader) // optionalprojectClassLoader.debug(boolean) // requireddebug.build();- Returns:
- A new ImmutableJasmineConfiguration builder
-
-