Class SchemaItem.BuilderBase<BUILDER extends SchemaItem.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SchemaItem>

java.lang.Object
io.helidon.json.schema.SchemaItem.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
SchemaArray.BuilderBase, SchemaBoolean.BuilderBase, SchemaInteger.BuilderBase, SchemaItem.Builder, SchemaNull.BuilderBase, SchemaNumber.BuilderBase, SchemaObject.BuilderBase, SchemaString.BuilderBase
Enclosing interface:
SchemaItem

public abstract static class SchemaItem.BuilderBase<BUILDER extends SchemaItem.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SchemaItem> extends Object implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for SchemaItem.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(SchemaItem prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(SchemaItem.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • clearTitle

      public BUILDER clearTitle()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • title

      public BUILDER title(String title)
      Title of the item.
      Parameters:
      title - item title
      Returns:
      updated builder instance
      See Also:
    • clearDescription

      public BUILDER clearDescription()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • description

      public BUILDER description(String description)
      Description of the item.
      Parameters:
      description - item description
      Returns:
      updated builder instance
      See Also:
    • required

      public BUILDER required(boolean required)
      Used in the object properties to mark required property.
      Parameters:
      required - whether object property is required
      Returns:
      updated builder instance
      See Also:
    • title

      public Optional<String> title()
      Title of the item.
      Returns:
      the title
    • description

      public Optional<String> description()
      Description of the item.
      Returns:
      the description
    • required

      public boolean required()
      Used in the object properties to mark required property.
      Returns:
      the required
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.