Class CodeGeneratorOptions.Builder
- java.lang.Object
-
- com.cosium.openapi.annotation_processor.code.CodeGeneratorOptions.Builder
-
- All Implemented Interfaces:
CodeGeneratorOptions.BuildFinal,CodeGeneratorOptions.OneGenerationFolderPerLanguageBuildStage
- Enclosing class:
- CodeGeneratorOptions
@NotThreadSafe public static final class CodeGeneratorOptions.Builder extends Object implements CodeGeneratorOptions.OneGenerationFolderPerLanguageBuildStage, CodeGeneratorOptions.BuildFinal
Builds instances of typeCodeGeneratorOptions. 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CodeGeneratorOptions.BuilderaddAllLanguages(Iterable<String> elements)Adds elements tolanguageslist.CodeGeneratorOptions.BuilderaddLanguages(String element)Adds one element tolanguageslist.CodeGeneratorOptions.BuilderaddLanguages(String... elements)Adds elements tolanguageslist.CodeGeneratorOptionsbuild()Builds a newCodeGeneratorOptions.CodeGeneratorOptions.BuilderoneGenerationFolderPerLanguage(boolean oneGenerationFolderPerLanguage)Initializes the value for theoneGenerationFolderPerLanguageattribute.
-
-
-
Method Detail
-
oneGenerationFolderPerLanguage
public final CodeGeneratorOptions.Builder oneGenerationFolderPerLanguage(boolean oneGenerationFolderPerLanguage)
Initializes the value for theoneGenerationFolderPerLanguageattribute.- Specified by:
oneGenerationFolderPerLanguagein interfaceCodeGeneratorOptions.OneGenerationFolderPerLanguageBuildStage- Parameters:
oneGenerationFolderPerLanguage- The value for oneGenerationFolderPerLanguage- Returns:
thisbuilder for use in a chained invocation
-
addLanguages
public final CodeGeneratorOptions.Builder addLanguages(String element)
Adds one element tolanguageslist.- Specified by:
addLanguagesin interfaceCodeGeneratorOptions.BuildFinal- Parameters:
element- A languages element- Returns:
thisbuilder for use in a chained invocation
-
addLanguages
public final CodeGeneratorOptions.Builder addLanguages(String... elements)
Adds elements tolanguageslist.- Specified by:
addLanguagesin interfaceCodeGeneratorOptions.BuildFinal- Parameters:
elements- An array of languages elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLanguages
public final CodeGeneratorOptions.Builder addAllLanguages(Iterable<String> elements)
Adds elements tolanguageslist.- Specified by:
addAllLanguagesin interfaceCodeGeneratorOptions.BuildFinal- Parameters:
elements- An iterable of languages elements- Returns:
thisbuilder for use in a chained invocation
-
build
public CodeGeneratorOptions build()
Builds a newCodeGeneratorOptions.- Specified by:
buildin interfaceCodeGeneratorOptions.BuildFinal- Returns:
- An immutable instance of CodeGeneratorOptions
- Throws:
IllegalStateException- if any required attributes are missing
-
-