Commit c5dc949d authored by Daniel Bluhm's avatar Daniel Bluhm

Set template with super constructor

Signed-off-by: Daniel Bluhm's avatarDaniel Bluhm <bluhmdj@ornl.gov>
parent 920776e1
......@@ -79,7 +79,7 @@ public class ImplementationWriter
String packageName, String interfaceName, String className,
@NonNull Fields fields, @NonNull Types types
) {
this.template = IMPL_TEMPLATE;
super(IMPL_TEMPLATE);
if (packageName != null) {
this.fqn = String.format("%s.%s", packageName, className);
} else {
......
......@@ -77,7 +77,7 @@ public class InterfaceWriter
String packageName, String interfaceName, @NonNull Fields fields,
@NonNull Types types
) {
this.template = TEMPLATE;
super(TEMPLATE);
if (packageName != null) {
this.fqn = String.format("%s.%s", packageName, interfaceName);
} else {
......
......@@ -97,8 +97,7 @@ public class PersistenceHandlerWriter
interfaceName, String implementation, String collection, @NonNull Fields
fields, @NonNull Types types
) {
super();
this.template = TEMPLATE;
super(TEMPLATE);
if (packageName != null) {
this.fqn = String.format("%s.%s", packageName, className);
} else {
......
......@@ -73,7 +73,8 @@ public abstract class VelocitySourceWriter implements FileWriter {
*/
protected Map<String, Object> context;
public VelocitySourceWriter() {
public VelocitySourceWriter(String template) {
this.template = template;
this.context = new HashMap<>();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment