Class 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 Detail

      • name

        private final java.lang.String name
      • type

        private final Type type
      • naming

        private final Naming naming
      • code

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

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

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

        private final com.google.common.collect.ImmutableList<java.lang.String> annotations
      • 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
    • Constructor Detail

      • ImmutableEncodedElement

        private ImmutableEncodedElement​(java.lang.String name,
                                        Type type,
                                        Naming naming,
                                        com.google.common.collect.ImmutableList<EncodedElement.Param> params,
                                        com.google.common.collect.ImmutableList<Code.Term> code,
                                        com.google.common.collect.ImmutableList<Type> thrown,
                                        com.google.common.collect.ImmutableSet<EncodedElement.Tag> tags,
                                        Type.Parameters typeParameters,
                                        com.google.common.collect.ImmutableList<EncodedElement.TypeParam> typeParams,
                                        com.google.common.collect.ImmutableList<java.lang.String> doc,
                                        com.google.common.collect.ImmutableList<java.lang.String> annotations,
                                        StandardNaming standardNaming)
    • Method Detail

      • name

        java.lang.String name()
        Specified by:
        name in class EncodedElement
        Returns:
        The value of the name 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
      • doc

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

        com.google.common.collect.ImmutableList<java.lang.String> annotations()
        Specified by:
        annotations in class EncodedElement
        Returns:
        The value of the annotations 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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.Iterable<java.lang.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​(java.lang.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​(java.lang.Iterable<java.lang.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
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableEncodedElement that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • 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 java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value EncodedElement with attribute values.
        Overrides:
        toString in class java.lang.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