Class ImmutableToolInfo

  • All Implemented Interfaces:
    ToolInfo

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    public final class ImmutableToolInfo
    extends Object
    implements ToolInfo
    Immutable implementation of ToolInfo.

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

    • Method Detail

      • withPrimaryExecutable

        public final ImmutableToolInfo withPrimaryExecutable​(String value)
        Copy the current immutable object by setting a present value for the optional primaryExecutable attribute.
        Parameters:
        value - The value for primaryExecutable
        Returns:
        A modified copy of this object
      • withPrimaryExecutable

        public final ImmutableToolInfo withPrimaryExecutable​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the primaryExecutable attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for primaryExecutable
        Returns:
        A modified copy of this object
      • withEnvironmentVariables

        public final ImmutableToolInfo withEnvironmentVariables​(Map<String,​? extends String> entries)
        Copy the current immutable object by replacing the environmentVariables map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        entries - The entries to be added to the environmentVariables map
        Returns:
        A modified copy of this object
      • withPathElements

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

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

        public final ImmutableToolInfo withUnhandledProjectResources​(Map<String,​? extends String> entries)
        Copy the current immutable object by replacing the unhandledProjectResources map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        entries - The entries to be added to the unhandledProjectResources map
        Returns:
        A modified copy of this object
      • equals

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

        public int hashCode()
        Computes a hash code from attributes: primaryExecutable, environmentVariables, pathElements, unhandledProjectResources.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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