<commit_before># Vert.x API Generation

[![Build Status](https://vertx.ci.cloudbees.com/buildStatus/icon?job=vert.x3-codegen)](https://vertx.ci.cloudbees.com/view/vert.x-3/job/vert.x3-codegen/)

This projects contains tools which allow idiomatic other language API shims to be generated from Java APIs.

## API generator

A code generator consist of an _MVEL_ template declared in a `codegen.json` descriptor:

~~~~
{
  "name": "Groovy",
  "generators": [ {
    "kind": "class",
    "fileName": "'groovy/' + fqn.replace('io.vertx', 'io.vertx.groovy').replace('.', '/') + '.groovy'",
    "templateFileName": "vertx-groovy/template/groovy.templ"
  } ]
}
~~~~

- `fileName` is an _MVEL_ expression for the file name, returning null skips the generation.
- `templateFileName` is the name of the _MVEL_ template to apply
- `incremental` true when the template performs incremental processing, false or absent otherwise
- `kind`: there are several kinds of generators for different use cases
    - `class` : applied on each API classes
    - `package` : applied on each Java package
    - `module` : applied on each declared module, a module uniquely identifies an API
    - `dataObject`: applied on each data object class
    - `proxy`: applied on each proxy class
    - `enum`: applied on each enum class annotated with `@VertxGen`<commit_msg>Added ref to codegen cli<commit_after># Vert.x API Generation

[![Build Status](https://vertx.ci.cloudbees.com/buildStatus/icon?job=vert.x3-codegen)](https://vertx.ci.cloudbees.com/view/vert.x-3/job/vert.x3-codegen/)

This projects contains tools which allow idiomatic other language API shims to be generated from Java APIs.

## Codegen CLI

A Codegen https://github.com/vietj/vertx-codegen-cli[CLI] to help you code generating files.

## API generator

A code generator consist of an _MVEL_ template declared in a `codegen.json` descriptor:

~~~~
{
  "name": "Groovy",
  "generators": [ {
    "kind": "class",
    "fileName": "'groovy/' + fqn.replace('io.vertx', 'io.vertx.groovy').replace('.', '/') + '.groovy'",
    "templateFileName": "vertx-groovy/template/groovy.templ"
  } ]
}
~~~~

- `fileName` is an _MVEL_ expression for the file name, returning null skips the generation.
- `templateFileName` is the name of the _MVEL_ template to apply
- `incremental` true when the template performs incremental processing, false or absent otherwise
- `kind`: there are several kinds of generators for different use cases
    - `class` : applied on each API classes
    - `package` : applied on each Java package
    - `module` : applied on each declared module, a module uniquely identifies an API
    - `dataObject`: applied on each data object class
    - `proxy`: applied on each proxy class
    - `enum`: applied on each enum class annotated with `@VertxGen`
{'fraction_non_alphanumeric': 0.12254376563058235, 'fraction_numerical': 0.0021436227224008574, 'mean_word_length': 4.026929982046679, 'pattern_counts': {'":': 10, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '582161', 'n_tokens_mistral': 866, 'n_tokens_neox': 833, 'n_words': 300}