Class ImmutableProcedureMeta.Builder
java.lang.Object
org.nuiton.db.meta.ImmutableProcedureMeta.Builder
- Enclosing class:
ImmutableProcedureMeta
@Generated(from="ProcedureMeta",
generator="Immutables")
public static final class ImmutableProcedureMeta.Builder
extends Object
Builds instances of type
ImmutableProcedureMeta.
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 TypeMethodDescriptionaddAllArgs(Iterable<? extends ArgumentMeta> elements) Adds elements toargslist.addArgs(ArgumentMeta element) Adds one element toargslist.addArgs(ArgumentMeta... elements) Adds elements toargslist.args(Iterable<? extends ArgumentMeta> elements) Sets or replaces all elements forargslist.build()Builds a newImmutableProcedureMeta.Initializes the optional valuecommentto comment.Initializes the optional valuecommentto comment.from(ProcedureMeta instance) Fill a builder with attribute values from the providedProcedureMetainstance.Initializes the value for thenameattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedProcedureMetainstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
addArgs
Adds one element toargslist.- Parameters:
element- A args element- Returns:
thisbuilder for use in a chained invocation
-
addArgs
Adds elements toargslist.- Parameters:
elements- An array of args elements- Returns:
thisbuilder for use in a chained invocation
-
args
@CanIgnoreReturnValue public final ImmutableProcedureMeta.Builder args(Iterable<? extends ArgumentMeta> elements) Sets or replaces all elements forargslist.- Parameters:
elements- An iterable of args elements- Returns:
thisbuilder for use in a chained invocation
-
addAllArgs
@CanIgnoreReturnValue public final ImmutableProcedureMeta.Builder addAllArgs(Iterable<? extends ArgumentMeta> elements) Adds elements toargslist.- Parameters:
elements- An iterable of args elements- Returns:
thisbuilder for use in a chained invocation
-
comment
Initializes the optional valuecommentto comment.- Parameters:
comment- The value for comment- Returns:
thisbuilder for chained invocation
-
comment
Initializes the optional valuecommentto comment.- Parameters:
comment- The value for comment- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableProcedureMeta.- Returns:
- An immutable instance of ProcedureMeta
- Throws:
IllegalStateException- if any required attributes are missing
-