@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","ModuleConfiguration"}) @Immutable @CheckReturnValue public final class ImmutableModuleConfiguration extends Object implements ModuleConfiguration
ModuleConfiguration.
Use the builder to create immutable instances:
ImmutableModuleConfiguration.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableModuleConfiguration.Builder
Builds instances of type
ImmutableModuleConfiguration. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableModuleConfiguration.Builder |
builder()
Creates a builder for
ImmutableModuleConfiguration. |
static ImmutableModuleConfiguration |
copyOf(ModuleConfiguration instance)
Creates an immutable copy of a
ModuleConfiguration value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableModuleConfiguration that have equal attribute values. |
String |
getGenerator()
Generator used to compile proto files.
|
com.google.common.collect.ImmutableList<Path> |
getIncludePaths()
List of "include" folders used to search for proto files.
|
String |
getName()
Module name.
|
com.google.common.collect.ImmutableMap<String,Object> |
getOptions()
Map of custom settings passed to the generator.
|
String |
getOutput()
Output directory.
|
com.google.common.collect.ImmutableList<String> |
getProtoFiles()
List of proto files to compile.
|
int |
hashCode()
Computes a hash code from attributes:
name, includePaths, protoFiles, generator, output, options. |
String |
toString()
Prints the immutable value
ModuleConfiguration with attribute values. |
ImmutableModuleConfiguration |
withGenerator(String value)
Copy the current immutable object by setting a value for the
generator attribute. |
ImmutableModuleConfiguration |
withIncludePaths(Iterable<? extends Path> elements)
Copy the current immutable object with elements that replace the content of
includePaths. |
ImmutableModuleConfiguration |
withIncludePaths(Path... elements)
Copy the current immutable object with elements that replace the content of
includePaths. |
ImmutableModuleConfiguration |
withName(String value)
Copy the current immutable object by setting a value for the
name attribute. |
ImmutableModuleConfiguration |
withOptions(Map<String,? extends Object> entries)
Copy the current immutable object by replacing the
options map with the specified map. |
ImmutableModuleConfiguration |
withOutput(String value)
Copy the current immutable object by setting a value for the
output attribute. |
ImmutableModuleConfiguration |
withProtoFiles(Iterable<String> elements)
Copy the current immutable object with elements that replace the content of
protoFiles. |
ImmutableModuleConfiguration |
withProtoFiles(String... elements)
Copy the current immutable object with elements that replace the content of
protoFiles. |
public String getName()
getName in interface ModuleConfigurationpublic com.google.common.collect.ImmutableList<Path> getIncludePaths()
getIncludePaths in interface ModuleConfigurationpublic com.google.common.collect.ImmutableList<String> getProtoFiles()
getProtoFiles in interface ModuleConfigurationpublic String getGenerator()
java - produces Java source code that uses protostuff runtime;html - produces HTML documentation;st4 - generic generator, you should provide custom template
(StringTemplate 4) using getOptions().
getGenerator in interface ModuleConfigurationpublic String getOutput()
getOutput in interface ModuleConfigurationpublic com.google.common.collect.ImmutableMap<String,Object> getOptions()
getOptions in interface ModuleConfigurationpublic final ImmutableModuleConfiguration withName(String value)
name attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for namethis objectpublic final ImmutableModuleConfiguration withIncludePaths(Path... elements)
includePaths.elements - The elements to setthis objectpublic final ImmutableModuleConfiguration withIncludePaths(Iterable<? extends Path> elements)
includePaths.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of includePaths elements to setthis objectpublic final ImmutableModuleConfiguration withProtoFiles(String... elements)
protoFiles.elements - The elements to setthis objectpublic final ImmutableModuleConfiguration withProtoFiles(Iterable<String> elements)
protoFiles.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of protoFiles elements to setthis objectpublic final ImmutableModuleConfiguration withGenerator(String value)
generator attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for generatorthis objectpublic final ImmutableModuleConfiguration withOutput(String value)
output attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for outputthis objectpublic final ImmutableModuleConfiguration withOptions(Map<String,? extends Object> entries)
options map with the specified map.
Nulls are not permitted as keys or values.
A shallow reference equality check is used to prevent copying of the same value by returning this.entries - The entries to be added to the options mapthis objectpublic boolean equals(@Nullable Object another)
ImmutableModuleConfiguration that have equal attribute values.public int hashCode()
name, includePaths, protoFiles, generator, output, options.public String toString()
ModuleConfiguration with attribute values.public static ImmutableModuleConfiguration copyOf(ModuleConfiguration instance)
ModuleConfiguration value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableModuleConfiguration.Builder builder()
ImmutableModuleConfiguration.Copyright © 2015–2017. All rights reserved.