}
@Override
public RuntimeSpecificationAdder add(String name, TwillRunnable runnable,
final ResourceSpecification resourceSpec) {
final TwillRunnableSpecification spec = new DefaultTwillRunnableSpecification(
runnable.getClass().getName(), name, runnable.configure().getConfigs());
return new RuntimeSpecificationAdder(new Function<Collection<LocalFile>, RunnableSetter>() {
@Override
public RunnableSetter apply(Collection<LocalFile> files) {
runnables.put(spec.getName(), new DefaultRuntimeSpecification(spec.getName(), spec, resourceSpec, files));
return RunnableSetter.this;
}
});
}