Class SpecificationGeneratorOptions
- java.lang.Object
-
- com.cosium.openapi.annotation_processor.specification.SpecificationGeneratorOptions
-
- All Implemented Interfaces:
ISpecificationGeneratorOptions
@ParametersAreNonnullByDefault @Immutable public final class SpecificationGeneratorOptions extends Object implements ISpecificationGeneratorOptions
Created on 12/07/17.- Author:
- Reda.Housni-Alaoui
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSpecificationGeneratorOptions.BasePathBuildStagestatic classSpecificationGeneratorOptions.BuilderBuilds instances of typeSpecificationGeneratorOptions.static interfaceSpecificationGeneratorOptions.BuildFinalstatic interfaceSpecificationGeneratorOptions.TitleBuildStage
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbasePath()static SpecificationGeneratorOptions.TitleBuildStagebuilder()Creates a builder forSpecificationGeneratorOptions.com.google.common.collect.ImmutableList<String>consumes()static SpecificationGeneratorOptionscopyOf(ISpecificationGeneratorOptions instance)Creates an immutable copy of aISpecificationGeneratorOptionsvalue.booleanequals(Object another)This instance is equal to all instances ofSpecificationGeneratorOptionsthat have equal attribute values.inthashCode()Computes a hash code from attributes:title,basePath,produces,consumes.com.google.common.collect.ImmutableList<String>produces()Stringtitle()StringtoString()Prints the immutable valueSpecificationGeneratorOptionswith attribute values.SpecificationGeneratorOptionswithBasePath(String value)Copy the current immutable object by setting a value for thebasePathattribute.SpecificationGeneratorOptionswithConsumes(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofconsumes.SpecificationGeneratorOptionswithConsumes(String... elements)Copy the current immutable object with elements that replace the content ofconsumes.SpecificationGeneratorOptionswithProduces(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofproduces.SpecificationGeneratorOptionswithProduces(String... elements)Copy the current immutable object with elements that replace the content ofproduces.SpecificationGeneratorOptionswithTitle(String value)Copy the current immutable object by setting a value for thetitleattribute.
-
-
-
Method Detail
-
title
public String title()
- Specified by:
titlein interfaceISpecificationGeneratorOptions- Returns:
- The title of the specification
-
basePath
public String basePath()
- Specified by:
basePathin interfaceISpecificationGeneratorOptions- Returns:
- The specification base path
-
produces
public com.google.common.collect.ImmutableList<String> produces()
- Specified by:
producesin interfaceISpecificationGeneratorOptions- Returns:
- The produced global mime types
-
consumes
public com.google.common.collect.ImmutableList<String> consumes()
- Specified by:
consumesin interfaceISpecificationGeneratorOptions- Returns:
- The consumes global mime types
-
withTitle
public final SpecificationGeneratorOptions withTitle(String value)
Copy the current immutable object by setting a value for thetitleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for title- Returns:
- A modified copy of the
thisobject
-
withBasePath
public final SpecificationGeneratorOptions withBasePath(String value)
Copy the current immutable object by setting a value for thebasePathattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for basePath- Returns:
- A modified copy of the
thisobject
-
withProduces
public final SpecificationGeneratorOptions withProduces(String... elements)
Copy the current immutable object with elements that replace the content ofproduces.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withProduces
public final SpecificationGeneratorOptions withProduces(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofproduces. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of produces elements to set- Returns:
- A modified copy of
thisobject
-
withConsumes
public final SpecificationGeneratorOptions withConsumes(String... elements)
Copy the current immutable object with elements that replace the content ofconsumes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withConsumes
public final SpecificationGeneratorOptions withConsumes(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofconsumes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of consumes elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofSpecificationGeneratorOptionsthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:title,basePath,produces,consumes.
-
toString
public String toString()
Prints the immutable valueSpecificationGeneratorOptionswith attribute values.
-
copyOf
public static SpecificationGeneratorOptions copyOf(ISpecificationGeneratorOptions instance)
Creates an immutable copy of aISpecificationGeneratorOptionsvalue. 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 SpecificationGeneratorOptions instance
-
builder
public static SpecificationGeneratorOptions.TitleBuildStage builder()
Creates a builder forSpecificationGeneratorOptions.- Returns:
- A new SpecificationGeneratorOptions builder
-
-