Class ImmutableError.Builder

  • Enclosing class:
    ImmutableError

    @NotThreadSafe
    public static final class ImmutableError.Builder
    extends Object
    Builds instances of type ImmutableError. 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 Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableError.Builder from​(StructuralNode instance)
        Fill a builder with attribute values from the provided io.dialob.program.model.StructuralNode instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutableError.Builder from​(Error instance)
        Fill a builder with attribute values from the provided io.dialob.program.model.Error instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • isPrototype

        @CanIgnoreReturnValue
        public final ImmutableError.Builder isPrototype​(boolean isPrototype)
        Initializes the value for the isPrototype attribute.

        If not set, this attribute will have a default value as returned by the initializer of isPrototype.

        Parameters:
        isPrototype - The value for isPrototype
        Returns:
        this builder for use in a chained invocation
      • code

        @CanIgnoreReturnValue
        public final ImmutableError.Builder code​(@Nullable
                                                 String code)
        Initializes the value for the code attribute.
        Parameters:
        code - The value for code (can be null)
        Returns:
        this builder for use in a chained invocation
      • itemId

        @CanIgnoreReturnValue
        public final ImmutableError.Builder itemId​(ItemId itemId)
        Initializes the value for the itemId attribute.
        Parameters:
        itemId - The value for itemId
        Returns:
        this builder for use in a chained invocation
      • validationExpression

        @CanIgnoreReturnValue
        public final ImmutableError.Builder validationExpression​(Expression validationExpression)
        Initializes the value for the validationExpression attribute.
        Parameters:
        validationExpression - The value for validationExpression
        Returns:
        this builder for use in a chained invocation
      • disabledExpression

        @CanIgnoreReturnValue
        public final ImmutableError.Builder disabledExpression​(Expression disabledExpression)
        Initializes the optional value disabledExpression to disabledExpression.
        Parameters:
        disabledExpression - The value for disabledExpression
        Returns:
        this builder for chained invocation
      • disabledExpression

        @CanIgnoreReturnValue
        public final ImmutableError.Builder disabledExpression​(Optional<? extends Expression> disabledExpression)
        Initializes the optional value disabledExpression to disabledExpression.
        Parameters:
        disabledExpression - The value for disabledExpression
        Returns:
        this builder for use in a chained invocation
      • label

        @CanIgnoreReturnValue
        public final ImmutableError.Builder label​(@Nullable
                                                  Expression label)
        Initializes the value for the label attribute.
        Parameters:
        label - The value for label (can be null)
        Returns:
        this builder for use in a chained invocation