Class Options
- java.lang.Object
-
- com.cosium.openapi.annotation_processor.option.Options
-
- All Implemented Interfaces:
IOptions
@ParametersAreNonnullByDefault @Immutable public final class Options extends Object implements IOptions
Created on 12/07/17.- Author:
- Reda.Housni-Alaoui
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceOptions.BaseGenerationPackageBuildStagestatic classOptions.BuilderBuilds instances of typeOptions.static interfaceOptions.BuildFinalstatic interfaceOptions.CodeGeneratorBuildStagestatic interfaceOptions.SpecificationGeneratorBuildStage
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbaseGenerationPackage()static Options.BaseGenerationPackageBuildStagebuilder()Creates a builder forOptions.ICodeGeneratorOptionscodeGenerator()static OptionscopyOf(IOptions instance)Creates an immutable copy of aIOptionsvalue.booleanequals(Object another)This instance is equal to all instances ofOptionsthat have equal attribute values.inthashCode()Computes a hash code from attributes:baseGenerationPackage,specificationGenerator,codeGenerator.ISpecificationGeneratorOptionsspecificationGenerator()StringtoString()Prints the immutable valueOptionswith attribute values.OptionswithBaseGenerationPackage(String value)Copy the current immutable object by setting a value for thebaseGenerationPackageattribute.OptionswithCodeGenerator(ICodeGeneratorOptions value)Copy the current immutable object by setting a value for thecodeGeneratorattribute.OptionswithSpecificationGenerator(ISpecificationGeneratorOptions value)Copy the current immutable object by setting a value for thespecificationGeneratorattribute.
-
-
-
Method Detail
-
baseGenerationPackage
public String baseGenerationPackage()
- Specified by:
baseGenerationPackagein interfaceIOptions- Returns:
- The base package that will be used to generate all resources
-
specificationGenerator
public ISpecificationGeneratorOptions specificationGenerator()
- Specified by:
specificationGeneratorin interfaceIOptions- Returns:
- The specification generator options
-
codeGenerator
public ICodeGeneratorOptions codeGenerator()
- Specified by:
codeGeneratorin interfaceIOptions- Returns:
- The code generator options
-
withBaseGenerationPackage
public final Options withBaseGenerationPackage(String value)
Copy the current immutable object by setting a value for thebaseGenerationPackageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for baseGenerationPackage- Returns:
- A modified copy of the
thisobject
-
withSpecificationGenerator
public final Options withSpecificationGenerator(ISpecificationGeneratorOptions value)
Copy the current immutable object by setting a value for thespecificationGeneratorattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for specificationGenerator- Returns:
- A modified copy of the
thisobject
-
withCodeGenerator
public final Options withCodeGenerator(ICodeGeneratorOptions value)
Copy the current immutable object by setting a value for thecodeGeneratorattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for codeGenerator- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofOptionsthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:baseGenerationPackage,specificationGenerator,codeGenerator.
-
toString
public String toString()
Prints the immutable valueOptionswith attribute values.
-
copyOf
public static Options copyOf(IOptions instance)
Creates an immutable copy of aIOptionsvalue. 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 Options instance
-
builder
public static Options.BaseGenerationPackageBuildStage builder()
Creates a builder forOptions.- Returns:
- A new Options builder
-
-