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 toimplementations
list.addImplementations
(TypeName element) Adds one element toimplementations
list.addImplementations
(TypeName... elements) Adds elements toimplementations
list.build()
Builds a newImmutableTypeInterface
.Fill a builder with attribute values from the provideddk.mada.jaxrs.model.types.Type
instance.from
(TypeInterface instance) Fill a builder with attribute values from the provideddk.mada.jaxrs.model.types.TypeInterface
instance.implementations
(Iterable<? extends TypeName> elements) Sets or replaces all elements forimplementations
list.packageName
(String packageName) Initializes the value for thepackageName
attribute.Initializes the value for thetypeName
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the provideddk.mada.jaxrs.model.types.TypeInterface
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
Fill a builder with attribute values from the provideddk.mada.jaxrs.model.types.Type
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
typeName
Initializes the value for thetypeName
attribute.- Parameters:
typeName
- The value for typeName- Returns:
this
builder for use in a chained invocation
-
packageName
Initializes the value for thepackageName
attribute.- Parameters:
packageName
- The value for packageName- Returns:
this
builder for use in a chained invocation
-
addImplementations
Adds one element toimplementations
list.- Parameters:
element
- A implementations element- Returns:
this
builder for use in a chained invocation
-
addImplementations
Adds elements toimplementations
list.- Parameters:
elements
- An array of implementations elements- Returns:
this
builder for use in a chained invocation
-
implementations
Sets or replaces all elements forimplementations
list.- Parameters:
elements
- An iterable of implementations elements- Returns:
this
builder for use in a chained invocation
-
addAllImplementations
public final ImmutableTypeInterface.Builder addAllImplementations(Iterable<? extends TypeName> elements) Adds elements toimplementations
list.- Parameters:
elements
- An iterable of implementations elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableTypeInterface
.- Returns:
- An immutable instance of TypeInterface
- Throws:
IllegalStateException
- if any required attributes are missing
-