public interface Arg extends AddsToRuleKey
BuildRule
, and also carry information for computing a rule key.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.
|
boolean |
equals(Object other) |
static Optional<String> |
flattenToSpaceSeparatedString(Optional<Arg> arg,
SourcePathResolverAdapter pathResolver) |
int |
hashCode() |
default String |
singleCommandLineArg(SourcePathResolverAdapter pathResolverAdapter)
Resolve this argument to single string, fail if this arg corresponds to none or more than one
argument.
|
static String |
stringify(Arg arg,
SourcePathResolverAdapter pathResolver)
Converts an Arg to a String by concatting all the command-line appended strings.
|
static <K> com.google.common.collect.ImmutableMap<K,String> |
stringify(com.google.common.collect.ImmutableMap<K,? extends Arg> argMap,
SourcePathResolverAdapter pathResolver) |
static com.google.common.collect.ImmutableList<String> |
stringify(Iterable<? extends Arg> args,
SourcePathResolverAdapter pathResolver) |
static com.google.common.collect.ImmutableList<String> |
stringifyList(Arg input,
SourcePathResolverAdapter pathResolver) |
String |
toString() |
static Optional<String> flattenToSpaceSeparatedString(Optional<Arg> arg, SourcePathResolverAdapter pathResolver)
void appendToCommandLine(java.util.function.Consumer<String> consumer, SourcePathResolverAdapter pathResolver)
default String singleCommandLineArg(SourcePathResolverAdapter pathResolverAdapter)
String toString()
static com.google.common.collect.ImmutableList<String> stringifyList(Arg input, SourcePathResolverAdapter pathResolver)
static com.google.common.collect.ImmutableList<String> stringify(Iterable<? extends Arg> args, SourcePathResolverAdapter pathResolver)
static String stringify(Arg arg, SourcePathResolverAdapter pathResolver)
static <K> com.google.common.collect.ImmutableMap<K,String> stringify(com.google.common.collect.ImmutableMap<K,? extends Arg> argMap, SourcePathResolverAdapter pathResolver)