Class WriteToFileArg

  • All Implemented Interfaces:
    AddsToRuleKey, Arg

    public class WriteToFileArg
    extends Object
    implements Arg
    Expands a delegated arg to a file and then appends @that/file/path.macro to the command line.
    • Constructor Detail

    • Method Detail

      • appendToCommandLine

        public void appendToCommandLine​(java.util.function.Consumer<String> consumer,
                                        SourcePathResolverAdapter pathResolver)
        Description copied from interface: Arg
        Feed the contents of the Arg to the supplied consumer. This call may feed any number of elements (including zero) into the consumer. This is only ever safe to call when the rule is running, as it may do things like resolving source paths.
        Specified by:
        appendToCommandLine in interface Arg
      • getContent

        protected String getContent​(SourcePathResolverAdapter pathResolver)
        Get the expanded content to write to the file. For some macros, the expanded value needs to be different when written to a file.