Support several templates

This commit is contained in:
Johan Maasing 2025-03-19 21:33:36 +01:00
parent e4e6b6fc25
commit 145a8672ab
Signed by: johan
GPG key ID: FFD31BABEE2DEED2

View file

@ -16,16 +16,11 @@ import java.util.Objects;
public class TargetGenerator { public class TargetGenerator {
private final Path outputPath; private final Path outputPath;
private final Path templatePath; private final Path templatePath;
private final boolean verbose;
public static String ENDPOINTS_TEMPLATE_NAME = "endpoints.ftl"; public static String ENDPOINTS_TEMPLATE_NAME = "endpoints.ftl";
private final List<EndpointNode> endpoints; private final List<EndpointNode> endpoints;
private final List<DataTypeNode> dataTypes; private final List<DataTypeNode> dataTypes;
public static class TargetGeneratorException extends Exception { public static class TargetGeneratorException extends Exception {
public TargetGeneratorException(String message) {
super(message);
}
public TargetGeneratorException(Exception cause) { public TargetGeneratorException(Exception cause) {
super(cause); super(cause);
} }
@ -38,7 +33,6 @@ public class TargetGenerator {
List<EndpointNode> endpoints, List<EndpointNode> endpoints,
List<DataTypeNode> dataTypes List<DataTypeNode> dataTypes
) { ) {
this.verbose = verbose;
this.outputPath = Objects.requireNonNull( this.outputPath = Objects.requireNonNull(
outputPath, outputPath,
"Output path is required" "Output path is required"