Class ImmutableAttributeBuilderDescriptor

java.lang.Object
org.immutables.value.processor.meta.AttributeBuilderDescriptor
org.immutables.value.processor.meta.ImmutableAttributeBuilderDescriptor

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableAttributeBuilderDescriptor extends AttributeBuilderDescriptor
Immutable implementation of AttributeBuilderDescriptor.

Use the builder to create immutable instances: ImmutableAttributeBuilderDescriptor.builder().

  • Field Details

    • valueToBuilderTarget

      private final AttributeBuilderDescriptor.ValueToBuilderTarget valueToBuilderTarget
    • valueToBuilderMethod

      private final String valueToBuilderMethod
    • buildMethod

      private final String buildMethod
    • qualifiedValueTypeName

      private final String qualifiedValueTypeName
    • qualifiedBuilderTypeName

      private final String qualifiedBuilderTypeName
    • qualifiedBuilderConstructorMethod

      private final String qualifiedBuilderConstructorMethod
  • Constructor Details

  • Method Details

    • getValueToBuilderTarget

      public AttributeBuilderDescriptor.ValueToBuilderTarget getValueToBuilderTarget()
      Specified by:
      getValueToBuilderTarget in class AttributeBuilderDescriptor
      Returns:
      The value of the valueToBuilderTarget attribute
    • getValueToBuilderMethod

      protected String getValueToBuilderMethod()
      A method name which when invoked will return a builder with all the properties set from the value object. This method will be invoked based on getValueToBuilderTarget()
      Specified by:
      getValueToBuilderMethod in class AttributeBuilderDescriptor
      Returns:
      method to create a value instance. No () included.
    • getBuildMethod

      public String getBuildMethod()
      A method to be invoked on the builder instance which returns a new value instance.
      Specified by:
      getBuildMethod in class AttributeBuilderDescriptor
      Returns:
      a method which constructs a new value instance.
    • getQualifiedValueTypeName

      public String getQualifiedValueTypeName()
      A fully qualified type for the value object.
      Specified by:
      getQualifiedValueTypeName in class AttributeBuilderDescriptor
      Returns:
      fully qualified name of the value type.
    • getQualifiedBuilderTypeName

      public String getQualifiedBuilderTypeName()
      A fully qualified type for the builder object.
      Specified by:
      getQualifiedBuilderTypeName in class AttributeBuilderDescriptor
      Returns:
      fully qualified name of the builder type.
    • getQualifiedBuilderConstructorMethod

      public String getQualifiedBuilderConstructorMethod()
      A fully qualified path and method which creates a new instance of a builder. If the builder is constructed from a no-arg constructor, the new keyword should be prepended with a space.
      Specified by:
      getQualifiedBuilderConstructorMethod in class AttributeBuilderDescriptor
      Returns:
      static path which invoked will create a new empty builder. No () included.
    • withValueToBuilderTarget

      Copy the current immutable object by setting a value for the valueToBuilderTarget attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for valueToBuilderTarget
      Returns:
      A modified copy of the this object
    • withValueToBuilderMethod

      public final ImmutableAttributeBuilderDescriptor withValueToBuilderMethod(String value)
      Copy the current immutable object by setting a value for the valueToBuilderMethod attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for valueToBuilderMethod
      Returns:
      A modified copy of the this object
    • withBuildMethod

      public final ImmutableAttributeBuilderDescriptor withBuildMethod(String value)
      Copy the current immutable object by setting a value for the buildMethod attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for buildMethod
      Returns:
      A modified copy of the this object
    • withQualifiedValueTypeName

      public final ImmutableAttributeBuilderDescriptor withQualifiedValueTypeName(String value)
      Copy the current immutable object by setting a value for the qualifiedValueTypeName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for qualifiedValueTypeName
      Returns:
      A modified copy of the this object
    • withQualifiedBuilderTypeName

      public final ImmutableAttributeBuilderDescriptor withQualifiedBuilderTypeName(String value)
      Copy the current immutable object by setting a value for the qualifiedBuilderTypeName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for qualifiedBuilderTypeName
      Returns:
      A modified copy of the this object
    • withQualifiedBuilderConstructorMethod

      public final ImmutableAttributeBuilderDescriptor withQualifiedBuilderConstructorMethod(String value)
      Copy the current immutable object by setting a value for the qualifiedBuilderConstructorMethod attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for qualifiedBuilderConstructorMethod
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableAttributeBuilderDescriptor that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableAttributeBuilderDescriptor another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: valueToBuilderTarget, valueToBuilderMethod, buildMethod, qualifiedValueTypeName, qualifiedBuilderTypeName, qualifiedBuilderConstructorMethod.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value AttributeBuilderDescriptor with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a AttributeBuilderDescriptor value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable AttributeBuilderDescriptor instance
    • builder

      Creates a builder for ImmutableAttributeBuilderDescriptor.
       ImmutableAttributeBuilderDescriptor.builder()
          .valueToBuilderTarget(org.immutables.value.processor.meta.AttributeBuilderDescriptor.ValueToBuilderTarget) // required valueToBuilderTarget
          .valueToBuilderMethod(String) // required valueToBuilderMethod
          .buildMethod(String) // required buildMethod
          .qualifiedValueTypeName(String) // required qualifiedValueTypeName
          .qualifiedBuilderTypeName(String) // required qualifiedBuilderTypeName
          .qualifiedBuilderConstructorMethod(String) // required qualifiedBuilderConstructorMethod
          .build();
       
      Returns:
      A new ImmutableAttributeBuilderDescriptor builder