Package dk.mada.jaxrs.model.types
Class ImmutableTypeInterface.Builder
java.lang.Object
dk.mada.jaxrs.model.types.ImmutableTypeInterface.Builder
- Enclosing class:
ImmutableTypeInterface
@Generated(from="TypeInterface",
generator="Immutables")
public static final class ImmutableTypeInterface.Builder
extends Object
Builds instances of type
ImmutableTypeInterface.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllImplementations(Iterable<? extends TypeName> elements) Adds elements toimplementationslist.addImplementations(TypeName element) Adds one element toimplementationslist.addImplementations(TypeName... elements) Adds elements toimplementationslist.build()Builds a newImmutableTypeInterface.Fill a builder with attribute values from the provideddk.mada.jaxrs.model.types.Typeinstance.from(TypeInterface instance) Fill a builder with attribute values from the provideddk.mada.jaxrs.model.types.TypeInterfaceinstance.implementations(Iterable<? extends TypeName> elements) Sets or replaces all elements forimplementationslist.packageName(String packageName) Initializes the value for thepackageNameattribute.Initializes the value for thetypeNameattribute.
-
Method Details
-
from
Fill a builder with attribute values from the provideddk.mada.jaxrs.model.types.TypeInterfaceinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the provideddk.mada.jaxrs.model.types.Typeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
typeName
Initializes the value for thetypeNameattribute.- Parameters:
typeName- The value for typeName- Returns:
thisbuilder for use in a chained invocation
-
packageName
Initializes the value for thepackageNameattribute.- Parameters:
packageName- The value for packageName- Returns:
thisbuilder for use in a chained invocation
-
addImplementations
Adds one element toimplementationslist.- Parameters:
element- A implementations element- Returns:
thisbuilder for use in a chained invocation
-
addImplementations
Adds elements toimplementationslist.- Parameters:
elements- An array of implementations elements- Returns:
thisbuilder for use in a chained invocation
-
implementations
Sets or replaces all elements forimplementationslist.- Parameters:
elements- An iterable of implementations elements- Returns:
thisbuilder for use in a chained invocation
-
addAllImplementations
public final ImmutableTypeInterface.Builder addAllImplementations(Iterable<? extends TypeName> elements) Adds elements toimplementationslist.- Parameters:
elements- An iterable of implementations elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableTypeInterface.- Returns:
- An immutable instance of TypeInterface
- Throws:
IllegalStateException- if any required attributes are missing
-