public class CodeTransProcessor extends AbstractProcessor
Verticle class. It scans all the compiled
classes and tries to generate corresponding scripts for each class.
The script is named after the verticle fqn using the last atom of the package name and the lower
cased class name, for example : examples.http.Server maps to http/server.js,
http/server.groovy, etc...
The processor is only active when the option codetrans.output is set to a valid directory where the scripts
will be written. A log codetrans.log will also be written with the processor activity.
The processor can be configured using the condetrans.config property targeting a JSON file. The JSON file
contains a set of exclusions and is structured as follows:
{
"excludes": [
{
"package" : "the (java) package to exclude",
"langs" : ["lang1", "lang2"]
}
]
}
The package element is mandatory. Langs is optional. When not set, all languages are skipped.
Languages are identified by their extensions.
processingEnv| Constructor and Description |
|---|
CodeTransProcessor() |
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getSupportedAnnotationTypes() |
Set<String> |
getSupportedOptions() |
void |
init(ProcessingEnvironment processingEnv) |
boolean |
process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) |
getCompletions, getSupportedSourceVersion, isInitializedpublic Set<String> getSupportedOptions()
getSupportedOptions in interface ProcessorgetSupportedOptions in class AbstractProcessorpublic Set<String> getSupportedAnnotationTypes()
getSupportedAnnotationTypes in interface ProcessorgetSupportedAnnotationTypes in class AbstractProcessorpublic void init(ProcessingEnvironment processingEnv)
init in interface Processorinit in class AbstractProcessorpublic boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
process in interface Processorprocess in class AbstractProcessorCopyright © 2017. All rights reserved.