public abstract class FreeMarkerWritable extends Object implements Writable
Writable
which uses the FreeMarker template engine to generate the output.Writable.Context
Constructor and Description |
---|
FreeMarkerWritable() |
Modifier and Type | Method and Description |
---|---|
protected String |
getTemplateName()
Returns the name of the template to be used for a specific writable type.
|
protected String |
getTemplateNameForClass(Class<?> clazz)
Returns the name of the template to be used for a specific writable type.
|
void |
write(Writable.Context context,
Writer writer)
Writes this element to the given writer.
|
public void write(Writable.Context context, Writer writer) throws Exception
Writable
protected String getTemplateName()
getTemplateNameForClass(Class)
is called with getClass()
, but this can be customized by
overriding this method if required.null
.protected String getTemplateNameForClass(Class<?> clazz)
*.ftl
is used as template
file name.clazz
- class to obtain a template fornull
.Copyright © 2012-2021 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.