Class ImmutableEncodedElement

java.lang.Object
org.immutables.value.processor.encode.EncodedElement
org.immutables.value.processor.encode.ImmutableEncodedElement

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

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

  • Field Details

    • name

      private final String name
    • type

      private final Type type
    • naming

      private final Naming naming
    • params

      private final com.google.common.collect.ImmutableList<EncodedElement.Param> params
    • code

      private final com.google.common.collect.ImmutableList<Code.Term> code
    • thrown

      private final com.google.common.collect.ImmutableList<Type> thrown
    • tags

      private final com.google.common.collect.ImmutableSet<EncodedElement.Tag> tags
    • typeParameters

      private final Type.Parameters typeParameters
    • typeParams

      private final com.google.common.collect.ImmutableList<EncodedElement.TypeParam> typeParams
    • doc

      private final com.google.common.collect.ImmutableList<String> doc
    • annotations

      private final com.google.common.collect.ImmutableList<String> annotations
    • standardNaming

      private final StandardNaming standardNaming
    • asBinding

      private final transient Code.Binding asBinding
    • isToString

      private final transient boolean isToString
    • isHashCode

      private final transient boolean isHashCode
    • isEquals

      private final transient boolean isEquals
    • isFrom

      private final transient boolean isFrom
    • isBuild

      private final transient boolean isBuild
    • isInit

      private final transient boolean isInit
    • isWasInit

      private final transient boolean isWasInit
    • isCopy

      private final transient boolean isCopy
    • isBuilderCopy

      private final transient boolean isBuilderCopy
    • isExpose

      private final transient boolean isExpose
    • inBuilder

      private final transient boolean inBuilder
    • isStatic

      private final transient boolean isStatic
    • isFinal

      private final transient boolean isFinal
    • isPrivate

      private final transient boolean isPrivate
    • isSynthetic

      private final transient boolean isSynthetic
    • isImplField

      private final transient boolean isImplField
    • isValueField

      private final transient boolean isValueField
    • isStaticField

      private final transient boolean isStaticField
    • isField

      private final transient boolean isField
    • isBuilderField

      private final transient boolean isBuilderField
    • isStaticMethod

      private final transient boolean isStaticMethod
    • isValueMethod

      private final transient boolean isValueMethod
    • isBuilderMethod

      private final transient boolean isBuilderMethod
    • isBuilderStaticField

      private final transient boolean isBuilderStaticField
    • oneLiner

      private final transient com.google.common.collect.ImmutableList<Code.Term> oneLiner
    • usesThis

      private final transient boolean usesThis
    • isInlinable

      private final transient boolean isInlinable
    • STAGE_INITIALIZING

      private static final byte STAGE_INITIALIZING
      See Also:
    • STAGE_UNINITIALIZED

      private static final byte STAGE_UNINITIALIZED
      See Also:
    • STAGE_INITIALIZED

      private static final byte STAGE_INITIALIZED
      See Also:
    • initShim

      private transient volatile ImmutableEncodedElement.InitShim initShim
  • Constructor Details

  • Method Details

    • name

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

      Type type()
      Specified by:
      type in class EncodedElement
      Returns:
      The value of the type attribute
    • naming

      Naming naming()
      Specified by:
      naming in class EncodedElement
      Returns:
      The value of the naming attribute
    • params

      com.google.common.collect.ImmutableList<EncodedElement.Param> params()
      Specified by:
      params in class EncodedElement
      Returns:
      The value of the params attribute
    • code

      com.google.common.collect.ImmutableList<Code.Term> code()
      Specified by:
      code in class EncodedElement
      Returns:
      The value of the code attribute
    • thrown

      com.google.common.collect.ImmutableList<Type> thrown()
      Specified by:
      thrown in class EncodedElement
      Returns:
      The value of the thrown attribute
    • tags

      com.google.common.collect.ImmutableSet<EncodedElement.Tag> tags()
      Specified by:
      tags in class EncodedElement
      Returns:
      The value of the tags attribute
    • typeParameters

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

      com.google.common.collect.ImmutableList<EncodedElement.TypeParam> typeParams()
      Specified by:
      typeParams in class EncodedElement
      Returns:
      The value of the typeParams attribute
    • doc

      com.google.common.collect.ImmutableList<String> doc()
      Specified by:
      doc in class EncodedElement
      Returns:
      The value of the doc attribute
    • annotations

      com.google.common.collect.ImmutableList<String> annotations()
      Specified by:
      annotations in class EncodedElement
      Returns:
      The value of the annotations attribute
    • standardNaming

      StandardNaming standardNaming()
      Overrides:
      standardNaming in class EncodedElement
      Returns:
      The value of the standardNaming attribute
    • asBinding

      Code.Binding asBinding()
      Overrides:
      asBinding in class EncodedElement
      Returns:
      The computed-at-construction value of the asBinding attribute
    • isToString

      boolean isToString()
      Overrides:
      isToString in class EncodedElement
      Returns:
      The computed-at-construction value of the isToString attribute
    • isHashCode

      boolean isHashCode()
      Overrides:
      isHashCode in class EncodedElement
      Returns:
      The computed-at-construction value of the isHashCode attribute
    • isEquals

      boolean isEquals()
      Overrides:
      isEquals in class EncodedElement
      Returns:
      The computed-at-construction value of the isEquals attribute
    • isFrom

      boolean isFrom()
      Overrides:
      isFrom in class EncodedElement
      Returns:
      The computed-at-construction value of the isFrom attribute
    • isBuild

      boolean isBuild()
      Overrides:
      isBuild in class EncodedElement
      Returns:
      The computed-at-construction value of the isBuild attribute
    • isInit

      boolean isInit()
      Overrides:
      isInit in class EncodedElement
      Returns:
      The computed-at-construction value of the isInit attribute
    • isWasInit

      boolean isWasInit()
      Overrides:
      isWasInit in class EncodedElement
      Returns:
      The computed-at-construction value of the isWasInit attribute
    • isCopy

      boolean isCopy()
      Overrides:
      isCopy in class EncodedElement
      Returns:
      The computed-at-construction value of the isCopy attribute
    • isBuilderCopy

      boolean isBuilderCopy()
      Overrides:
      isBuilderCopy in class EncodedElement
      Returns:
      The computed-at-construction value of the isBuilderCopy attribute
    • isExpose

      boolean isExpose()
      Overrides:
      isExpose in class EncodedElement
      Returns:
      The computed-at-construction value of the isExpose attribute
    • inBuilder

      boolean inBuilder()
      Overrides:
      inBuilder in class EncodedElement
      Returns:
      The computed-at-construction value of the inBuilder attribute
    • isStatic

      boolean isStatic()
      Overrides:
      isStatic in class EncodedElement
      Returns:
      The computed-at-construction value of the isStatic attribute
    • isFinal

      boolean isFinal()
      Overrides:
      isFinal in class EncodedElement
      Returns:
      The computed-at-construction value of the isFinal attribute
    • isPrivate

      boolean isPrivate()
      Overrides:
      isPrivate in class EncodedElement
      Returns:
      The computed-at-construction value of the isPrivate attribute
    • isSynthetic

      boolean isSynthetic()
      Overrides:
      isSynthetic in class EncodedElement
      Returns:
      The computed-at-construction value of the isSynthetic attribute
    • isImplField

      boolean isImplField()
      Overrides:
      isImplField in class EncodedElement
      Returns:
      The computed-at-construction value of the isImplField attribute
    • isValueField

      boolean isValueField()
      Overrides:
      isValueField in class EncodedElement
      Returns:
      The computed-at-construction value of the isValueField attribute
    • isStaticField

      boolean isStaticField()
      Overrides:
      isStaticField in class EncodedElement
      Returns:
      The computed-at-construction value of the isStaticField attribute
    • isField

      boolean isField()
      Overrides:
      isField in class EncodedElement
      Returns:
      The computed-at-construction value of the isField attribute
    • isBuilderField

      boolean isBuilderField()
      Overrides:
      isBuilderField in class EncodedElement
      Returns:
      The computed-at-construction value of the isBuilderField attribute
    • isStaticMethod

      boolean isStaticMethod()
      Overrides:
      isStaticMethod in class EncodedElement
      Returns:
      The computed-at-construction value of the isStaticMethod attribute
    • isValueMethod

      boolean isValueMethod()
      Overrides:
      isValueMethod in class EncodedElement
      Returns:
      The computed-at-construction value of the isValueMethod attribute
    • isBuilderMethod

      boolean isBuilderMethod()
      Overrides:
      isBuilderMethod in class EncodedElement
      Returns:
      The computed-at-construction value of the isBuilderMethod attribute
    • isBuilderStaticField

      boolean isBuilderStaticField()
      Overrides:
      isBuilderStaticField in class EncodedElement
      Returns:
      The computed-at-construction value of the isBuilderStaticField attribute
    • oneLiner

      com.google.common.collect.ImmutableList<Code.Term> oneLiner()
      Overrides:
      oneLiner in class EncodedElement
      Returns:
      The computed-at-construction value of the oneLiner attribute
    • usesThis

      boolean usesThis()
      Overrides:
      usesThis in class EncodedElement
      Returns:
      The computed-at-construction value of the usesThis attribute
    • isInlinable

      boolean isInlinable()
      Overrides:
      isInlinable in class EncodedElement
      Returns:
      The computed-at-construction value of the isInlinable attribute
    • withName

      public final ImmutableEncodedElement 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
    • withType

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

      public final ImmutableEncodedElement withNaming(Naming value)
      Copy the current immutable object by setting a value for the naming attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for naming
      Returns:
      A modified copy of the this object
    • withParams

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

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

      public final ImmutableEncodedElement withCode(Code.Term... elements)
      Copy the current immutable object with elements that replace the content of code.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withCode

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

      public final ImmutableEncodedElement withThrown(Type... elements)
      Copy the current immutable object with elements that replace the content of thrown.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withThrown

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

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

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

      public final ImmutableEncodedElement 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
    • withTypeParams

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

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

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

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

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

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

      public final ImmutableEncodedElement withStandardNaming(StandardNaming value)
      Copy the current immutable object by setting a value for the standardNaming attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for standardNaming
      Returns:
      A modified copy of the this object
    • equals

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

      public int hashCode()
      Computes a hash code from attributes: name, type, naming, params, code, thrown, tags, typeParameters, typeParams, doc, annotations, standardNaming, asBinding, isToString, isHashCode, isEquals, isFrom, isBuild, isInit, isWasInit, isCopy, isBuilderCopy, isExpose, inBuilder, isStatic, isFinal, isPrivate, isSynthetic, isImplField, isValueField, isStaticField, isField, isBuilderField, isStaticMethod, isValueMethod, isBuilderMethod, isBuilderStaticField, oneLiner, usesThis, isInlinable.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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