Class ImmutableEncodingInfo

java.lang.Object
org.immutables.value.processor.encode.EncodingInfo
org.immutables.value.processor.encode.ImmutableEncodingInfo

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable final class ImmutableEncodingInfo extends EncodingInfo
Immutable implementation of EncodingInfo.

Use the builder to create immutable instances: new EncodingInfo.Builder().

  • Field Details

  • Constructor Details

  • Method Details

    • name

      String name()
      Specified by:
      name in class EncodingInfo
      Returns:
      The value of the name attribute
    • imports

      com.google.common.collect.ImmutableSet<String> imports()
      Specified by:
      imports in class EncodingInfo
      Returns:
      The value of the imports attribute
    • typeParameters

      Type.Parameters typeParameters()
      Specified by:
      typeParameters in class EncodingInfo
      Returns:
      The value of the typeParameters attribute
    • typeFactory

      Type.Factory typeFactory()
      Specified by:
      typeFactory in class EncodingInfo
      Returns:
      The value of the typeFactory attribute
    • element

      com.google.common.collect.ImmutableList<EncodedElement> element()
      Specified by:
      element in class EncodingInfo
      Returns:
      The value of the element attribute
    • builderCopy

      @Nullable public EncodedElement builderCopy()
      Overrides:
      builderCopy in class EncodingInfo
      Returns:
      The computed-at-construction value of the builderCopy attribute
    • isWasInit

      @Nullable public EncodedElement isWasInit()
      Overrides:
      isWasInit in class EncodingInfo
      Returns:
      The computed-at-construction value of the isWasInit attribute
    • from

      public EncodedElement from()
      Overrides:
      from in class EncodingInfo
      Returns:
      The computed-at-construction value of the from attribute
    • impl

      public EncodedElement impl()
      Overrides:
      impl in class EncodingInfo
      Returns:
      The computed-at-construction value of the impl attribute
    • build

      public EncodedElement build()
      Overrides:
      build in class EncodingInfo
      Returns:
      The computed-at-construction value of the build attribute
    • equals

      public EncodedElement equals()
      Overrides:
      equals in class EncodingInfo
      Returns:
      The computed-at-construction value of the equals attribute
    • hash

      public EncodedElement hash()
      Overrides:
      hash in class EncodingInfo
      Returns:
      The computed-at-construction value of the hash attribute
    • string

      public EncodedElement string()
      Overrides:
      string in class EncodingInfo
      Returns:
      The computed-at-construction value of the string attribute
    • crossReferencedMethods

      com.google.common.collect.ImmutableSet<String> crossReferencedMethods()
      Overrides:
      crossReferencedMethods in class EncodingInfo
      Returns:
      The computed-at-construction value of the crossReferencedMethods attribute
    • withName

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

      public final ImmutableEncodingInfo withImports(String... elements)
      Copy the current immutable object with elements that replace the content of imports.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withImports

      public final ImmutableEncodingInfo withImports(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of imports. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of imports elements to set
      Returns:
      A modified copy of this object
    • withTypeParameters

      public final ImmutableEncodingInfo withTypeParameters(Type.Parameters value)
      Copy the current immutable object by setting a value for the typeParameters attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for typeParameters
      Returns:
      A modified copy of the this object
    • withTypeFactory

      public final ImmutableEncodingInfo withTypeFactory(Type.Factory value)
      Copy the current immutable object by setting a value for the typeFactory attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for typeFactory
      Returns:
      A modified copy of the this object
    • withElement

      public final ImmutableEncodingInfo withElement(EncodedElement... elements)
      Copy the current immutable object with elements that replace the content of element.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withElement

      public final ImmutableEncodingInfo withElement(Iterable<? extends EncodedElement> elements)
      Copy the current immutable object with elements that replace the content of element. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of element elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableEncodingInfo 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, ImmutableEncodingInfo another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: name.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static EncodingInfo copyOf(EncodingInfo instance)
      Creates an immutable copy of a EncodingInfo 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 EncodingInfo instance