Class 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().

    • Constructor Detail

      • ImmutableEncodingInfo

        private ImmutableEncodingInfo​(java.lang.String name,
                                      com.google.common.collect.ImmutableSet<java.lang.String> imports,
                                      Type.Parameters typeParameters,
                                      Type.Factory typeFactory,
                                      com.google.common.collect.ImmutableList<EncodedElement> element)
    • Method Detail

      • name

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

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

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

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

        public final ImmutableEncodingInfo 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
      • withImports

        public final ImmutableEncodingInfo withImports​(java.lang.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​(java.lang.Iterable<java.lang.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​(java.lang.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
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableEncodingInfo 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.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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