io.polaris.builder.code.config.CodeEnvBuilder Maven / Gradle / Ivy
package io.polaris.builder.code.config;
import io.polaris.builder.code.CodeGenerator;
import java.util.*;
import java.util.function.Supplier;
/**
* @author Qt
* @since 1.8
*/
public class CodeEnvBuilder {
private final CodeGenerator generator;
private final CodeEnv target;
public CodeEnvBuilder(CodeGenerator generator, CodeEnv target) {
this.generator = generator;
this.target = target;
}
public CodeEnv build() {
return target;
}
public CodeGenerator end() {
return generator;
}
public CodeEnvBuilder outdir(String outdir) {
target.setOutdir(outdir);
return this;
}
public CodeEnvBuilder property(Map property) {
target.setProperty(property);
return this;
}
public CodeEnvBuilder property(Supplier