Top Fields Constructors Methods
io.vertx.codegen.generators.dataobjecthelper

public Class DataObjectHelperGen

extends Generator<DataObjectModel>
Class Inheritance
Imports
io.vertx.codegen.Generator, .DataObjectModel, .PropertyInfo, io.vertx.codegen.annotations.DataObject, io.vertx.codegen.format.CamelCase, .Case, .KebabCase, .LowerCamelCase, .QualifiedCase, .SnakeCase, io.vertx.codegen.type.AnnotationValueInfo, .ClassKind, .ClassTypeInfo, .DataObjectInfo, .MapperInfo, .TypeInfo, io.vertx.codegen.writer.CodeWriter, java.io.PrintWriter, .StringWriter, java.lang.annotation.Annotation, java.time.Instant, java.util.*

Author
Julien Viet

Field Summary

Modifier and TypeField and Description
private Case
Inherited from io.vertx.codegen.Generator:
envincrementalkindsname

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Collection<Class<? extends Annotation>>
public String
filename(DataObjectModel
the model
model
)

Overrides io.vertx.codegen.Generator.filename.

Generate the file name for the model.

private void
genFromJson(String visibility, boolean inheritConverter, DataObjectModel model, PrintWriter writer)

private void
genPropFromJson(String cast, String before, String after, PropertyInfo prop, PrintWriter writer)

private void
genPropToJson(String before, String after, PropertyInfo prop, PrintWriter writer)

private void
genToJson(String visibility, boolean inheritConverter, DataObjectModel model, PrintWriter writer)

private Case
public String
render(DataObjectModel
the model
model
,
int
the index for an incremental generator
index
,
int
the number of models for an incremental generator
size
,
Map<String, Object>
the session
session
)

Overrides io.vertx.codegen.Generator.render.

Render the model

Inherited from io.vertx.codegen.Generator:
load

Field Detail

formatterback to summary
private Case formatter

Constructor Detail

DataObjectHelperGenback to summary
public DataObjectHelperGen()

Method Detail

annotationsback to summary
public Collection<Class<? extends Annotation>> annotations()

Overrides io.vertx.codegen.Generator.annotations.

Annotations
@Override
filenameback to summary
public String filename(DataObjectModel model)

Overrides io.vertx.codegen.Generator.filename.

Doc from io.vertx.codegen.Generator.filename.

Generate the file name for the model.

When the returned value

  • is null, no file is created
  • does not contain / 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 process
  • starts with the resources/ 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
  • otherwise the resource will be created as a file on the filesystem, a value not starting with / is created relative to the codegen.output directory
Parameters
model:DataObjectModel

the model

Returns:String

the filename or null if no generation should happen

Annotations
@Override
genFromJsonback to summary
private void genFromJson(String visibility, boolean inheritConverter, DataObjectModel model, PrintWriter writer)
genPropFromJsonback to summary
private void genPropFromJson(String cast, String before, String after, PropertyInfo prop, PrintWriter writer)
genPropToJsonback to summary
private void genPropToJson(String before, String after, PropertyInfo prop, PrintWriter writer)
genToJsonback to summary
private void genToJson(String visibility, boolean inheritConverter, DataObjectModel model, PrintWriter writer)
getCaseback to summary
private Case getCase(DataObjectModel model)
renderback to summary
public String render(DataObjectModel model, int index, int size, Map<String, Object> session)

Overrides io.vertx.codegen.Generator.render.

Doc from io.vertx.codegen.Generator.render.

Render the model

Parameters
model:DataObjectModel

the model

index:int

the index for an incremental generator

size:int

the number of models for an incremental generator

session:Map<String, Object>

the session

Returns:String

the rendered string or null

Annotations
@Override