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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableProcedureMeta.Builder from(ProcedureMeta instance)
      Fill a builder with attribute values from the provided ProcedureMeta instance. 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:
      this builder for use in a chained invocation
    • name

      @CanIgnoreReturnValue public final ImmutableProcedureMeta.Builder name(String name)
      Initializes the value for the name attribute.
      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
    • addArgs

      @CanIgnoreReturnValue public final ImmutableProcedureMeta.Builder addArgs(ArgumentMeta element)
      Adds one element to args list.
      Parameters:
      element - A args element
      Returns:
      this builder for use in a chained invocation
    • addArgs

      @CanIgnoreReturnValue public final ImmutableProcedureMeta.Builder addArgs(ArgumentMeta... elements)
      Adds elements to args list.
      Parameters:
      elements - An array of args elements
      Returns:
      this builder for use in a chained invocation
    • args

      @CanIgnoreReturnValue public final ImmutableProcedureMeta.Builder args(Iterable<? extends ArgumentMeta> elements)
      Sets or replaces all elements for args list.
      Parameters:
      elements - An iterable of args elements
      Returns:
      this builder for use in a chained invocation
    • addAllArgs

      @CanIgnoreReturnValue public final ImmutableProcedureMeta.Builder addAllArgs(Iterable<? extends ArgumentMeta> elements)
      Adds elements to args list.
      Parameters:
      elements - An iterable of args elements
      Returns:
      this builder for use in a chained invocation
    • comment

      @CanIgnoreReturnValue public final ImmutableProcedureMeta.Builder comment(String comment)
      Initializes the optional value comment to comment.
      Parameters:
      comment - The value for comment
      Returns:
      this builder for chained invocation
    • comment

      @CanIgnoreReturnValue public final ImmutableProcedureMeta.Builder comment(Optional<String> comment)
      Initializes the optional value comment to comment.
      Parameters:
      comment - The value for comment
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableProcedureMeta build()
      Returns:
      An immutable instance of ProcedureMeta
      Throws:
      IllegalStateException - if any required attributes are missing