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 Details

    • from

      public final ImmutableTypeInterface.Builder from(TypeInterface instance)
      Fill a builder with attribute values from the provided dk.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

      public final ImmutableTypeInterface.Builder from(Type instance)
      Fill a builder with attribute values from the provided dk.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

      public final ImmutableTypeInterface.Builder typeName(TypeName typeName)
      Initializes the value for the typeName attribute.
      Parameters:
      typeName - The value for typeName
      Returns:
      this builder for use in a chained invocation
    • packageName

      public final ImmutableTypeInterface.Builder packageName(String packageName)
      Initializes the value for the packageName attribute.
      Parameters:
      packageName - The value for packageName
      Returns:
      this builder for use in a chained invocation
    • addImplementations

      public final ImmutableTypeInterface.Builder addImplementations(TypeName element)
      Adds one element to implementations list.
      Parameters:
      element - A implementations element
      Returns:
      this builder for use in a chained invocation
    • addImplementations

      public final ImmutableTypeInterface.Builder addImplementations(TypeName... elements)
      Adds elements to implementations list.
      Parameters:
      elements - An array of implementations elements
      Returns:
      this builder for use in a chained invocation
    • implementations

      public final ImmutableTypeInterface.Builder implementations(Iterable<? extends TypeName> elements)
      Sets or replaces all elements for implementations 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 to implementations list.
      Parameters:
      elements - An iterable of implementations elements
      Returns:
      this builder for use in a chained invocation
    • build

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