this.baseInvocation = baseInvocation;
this.outputFileSuffix = outputFileSuffix;
}
public WorkResult execute(AssembleSpec spec) {
MutableCommandLineToolInvocation invocation = baseInvocation.copy();
invocation.setWorkDirectory(spec.getObjectFileDir());
for (File sourceFile : spec.getSourceFiles()) {
ArgsTransformer<AssembleSpec> arguments = new AssembleSpecToArgsList(sourceFile, spec.getObjectFileDir(), outputFileSuffix);
invocation.setArgs(arguments.transform(spec));
commandLineTool.execute(invocation);
}
return new SimpleWorkResult(!spec.getSourceFiles().isEmpty());
}