Class ImmutableTrees.Parameter.Builder

java.lang.Object
org.immutables.generator.processor.ImmutableTrees.Parameter.Builder
Enclosing class:
ImmutableTrees.Parameter

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

  • Field Details

  • Constructor Details

    • Builder

      private Builder()
  • Method Details

    • from

      public final ImmutableTrees.Parameter.Builder from(Trees.Named instance)
      Fill a builder with attribute values from the provided org.immutables.generator.processor.Trees.Named instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final ImmutableTrees.Parameter.Builder from(Trees.Parameter instance)
      Fill a builder with attribute values from the provided org.immutables.generator.processor.Trees.Parameter instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final ImmutableTrees.Parameter.Builder from(Trees.Typed instance)
      Fill a builder with attribute values from the provided org.immutables.generator.processor.Trees.Typed instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      private void from(short _unused, Object object)
    • name

      Initializes the value for the name attribute.
      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
    • type

      Initializes the value for the type attribute.
      Parameters:
      type - The value for type
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableTrees.Parameter build()
      Builds a new Parameter.
      Returns:
      An immutable instance of Parameter
      Throws:
      IllegalStateException - if any required attributes are missing
    • formatRequiredAttributesMessage

      private String formatRequiredAttributesMessage()