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, isInitialized
public Set<String> getSupportedOptions()
getSupportedOptions
in interface Processor
getSupportedOptions
in class AbstractProcessor
public Set<String> getSupportedAnnotationTypes()
getSupportedAnnotationTypes
in interface Processor
getSupportedAnnotationTypes
in class AbstractProcessor
public void init(ProcessingEnvironment processingEnv)
init
in interface Processor
init
in class AbstractProcessor
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
process
in interface Processor
process
in class AbstractProcessor
Copyright © 2018. All rights reserved.