@@ -0,0 +1,2131 @@
+package ahlers.phantom.embedded;%0A%0Aimport com.google.common.collect.ImmutableList;%0Aimport de.flapdoodle.embed.process.builder.AbstractBuilder;%0Aimport de.flapdoodle.embed.process.builder.IProperty;%0Aimport de.flapdoodle.embed.process.builder.TypedProperty;%0A%0Aimport java.io.File;%0A%0A/**%0A * @author %5B%5Bmailto:michael@ahlers.consulting Michael Ahlers%5D%5D%0A */%0Apublic class PhantomScriptBuilder%0A        extends AbstractBuilder%3CIPhantomScript%3E %7B%0A%0A    protected static final TypedProperty%3CFile%3E SOURCE = TypedProperty.with(%22source%22, File.class);%0A%0A    private ImmutableList.Builder%3CString%3E arguments = ImmutableList.builder();%0A%0A    @Override%0A    public IPhantomScript build() %7B%0A        return new ImmutablePhantomScript(%0A                source().get(),%0A                arguments().build()%0A        );%0A    %7D%0A%0A    protected IProperty%3CFile%3E source() %7B%0A        return property(SOURCE);%0A    %7D%0A%0A    public PhantomScriptBuilder source(final File value) %7B%0A        source().set(value);%0A        return this;%0A    %7D%0A%0A    protected ImmutableList.Builder%3CString%3E arguments() %7B%0A        return arguments;%0A    %7D%0A%0A    public PhantomScriptBuilder arguments(final Iterable%3CString%3E value) %7B%0A        this.arguments = ImmutableList.builder();%0A        this.arguments.addAll(value);%0A        return this;%0A    %7D%0A%0A    public PhantomScriptBuilder argument(final String value) %7B%0A        this.arguments.add(value);%0A        return this;%0A    %7D%0A%0A    static class ImmutablePhantomScript%0A            implements IPhantomScript %7B%0A%0A        private final File source;%0A%0A        private final ImmutableList%3CString%3E arguments;%0A%0A        protected ImmutablePhantomScript(%0A                final File source,%0A                final ImmutableList%3CString%3E arguments%0A        ) %7B%0A            this.source = source;%0A            this.arguments = arguments;%0A        %7D%0A%0A        @Override%0A        public File source() %7B%0A            return source;%0A        %7D%0A%0A        @Override%0A        public ImmutableList%3CString%3E arguments() %7B%0A            return arguments;%0A        %7D%0A%0A        @Override%0A        public String toString() %7B%0A            return String.format(%22%25s %25s%22, source(), arguments());%0A        %7D%0A    %7D%0A%0A%7D%0A

Support building script objects