public class SanitizedArg extends Object implements Arg
Arg which must be sanitized before contributing to a RuleKey.
 
 ImmutableMap<String, String> toolchainRoots =
     ImmutableMap.of("/opt/toolchain", "$TOOLCHAIN_ROOT");
 Path toolchainRoot = Paths.get("/opt/toolchain");
 Arg arg =
     new SanitizedArg(
         Functions.forMap(toolchainRoots),
         "/opt/toolchain/bin/tool");
 | Modifier and Type | Method and Description | 
|---|---|
| void | appendToCommandLine(java.util.function.Consumer<String> consumer,
                   SourcePathResolverAdapter pathResolver)Feed the contents of the Arg to the supplied consumer. | 
| static SanitizedArg | create(java.util.function.Function<? super String,String> sanitizer,
      String unsanitized)Create a SanitizedArg by applying the given sanitizer function to an arg string. | 
| boolean | equals(Object o) | 
| static com.google.common.collect.ImmutableList<Arg> | from(java.util.function.Function<? super String,String> sanitizer,
    Iterable<String> args)Create a list of SanitizedArgs by applying the given sanitizer function to a list of arg
 strings and filtering empty args | 
| static com.google.common.collect.ImmutableList<Arg> | fromArgs(java.util.function.Function<? super String,String> sanitizer,
        Iterable<Arg> args)Create a list of SanitizedArg from list of Arg by applying the given sanitizer StringArg and
 filtering empty StringArg. | 
| int | hashCode() | 
| String | toString() | 
clone, finalize, getClass, notify, notifyAll, wait, wait, waitflattenToSpaceSeparatedString, singleCommandLineArg, stringify, stringify, stringify, stringifyListpublic void appendToCommandLine(java.util.function.Consumer<String> consumer, SourcePathResolverAdapter pathResolver)
ArgappendToCommandLine in interface Argpublic String toString()
public boolean equals(Object o)
public int hashCode()
public static SanitizedArg create(java.util.function.Function<? super String,String> sanitizer, String unsanitized)
public static com.google.common.collect.ImmutableList<Arg> from(java.util.function.Function<? super String,String> sanitizer, Iterable<String> args)