public abstract class MapperGenBase extends Generator<DataObjectModel>
env, incremental, kinds, name| Constructor and Description |
|---|
MapperGenBase() |
| Modifier and Type | Method and Description |
|---|---|
Collection<Class<? extends Annotation>> |
annotations() |
String |
filename(DataObjectModel model)
Generate the file name for the
model. |
protected abstract String |
genSimpleName(DataObjectModel model) |
protected abstract Optional<AnnotationValueInfo> |
getAnnotation(DataObjectModel model) |
protected String |
getMappingName(PropertyInfo prop,
String annotationName) |
String |
render(DataObjectModel model,
int index,
int size,
Map<String,Object> session)
Render the model
|
protected abstract void |
renderDeclaration(DataObjectModel model,
PrintWriter writer) |
protected abstract void |
renderMembers(String visibility,
DataObjectModel model,
PrintWriter writer) |
public Collection<Class<? extends Annotation>> annotations()
annotations in class Generator<DataObjectModel>public String filename(DataObjectModel model)
Generatormodel.
When the returned value
null, no file is created/ and ends with .java, the file is created as a source file by the annotation processor
and the class will be compiled by the current compilation processresources/ prefix, the file is created as a resource file by the annotation processor using the
remaining suffix value and the file will likely end in the classes directory/ is created relative to the codegen.output directoryfilename in class Generator<DataObjectModel>model - the modelnull if no generation should happenprotected abstract Optional<AnnotationValueInfo> getAnnotation(DataObjectModel model)
protected abstract String genSimpleName(DataObjectModel model)
public String render(DataObjectModel model, int index, int size, Map<String,Object> session)
Generatorrender in class Generator<DataObjectModel>model - the modelindex - the index for an incremental generatorsize - the number of models for an incremental generatorsession - the sessionnullprotected abstract void renderDeclaration(DataObjectModel model, PrintWriter writer)
protected abstract void renderMembers(String visibility, DataObjectModel model, PrintWriter writer)
protected String getMappingName(PropertyInfo prop, String annotationName)
Copyright © 2021. All rights reserved.