javax.annotation.processing
9 classes of the module java.compiler.
Load them with:
using {
"javax.annotation.processing"
}
AbstractProcessor Completion Completions Filer FilerException Messager ProcessingEnvironment Processor RoundEnvironment
AbstractProcessor#
abstract · extends Object · javax.annotation.processing.AbstractProcessor
Implements: Processor
Methods
| Method | Ring call | Java overloads |
|---|---|---|
@init | @init(processingEnv) | void init(ProcessingEnvironment processingEnv) |
getCompletions | getCompletions(element,annotation,member,userText) | Iterable getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText) |
getSupportedAnnotationTypes | getSupportedAnnotationTypes() | Set getSupportedAnnotationTypes() |
getSupportedOptions | getSupportedOptions() | Set getSupportedOptions() |
getSupportedSourceVersion | getSupportedSourceVersion() | SourceVersion getSupportedSourceVersion() |
process | process(annotations,roundEnv) | boolean process(Set annotations, RoundEnvironment roundEnv) |
The methods and fields of Object are inherited.
Completion#
interface · javax.annotation.processing.Completion
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getMessage | getMessage() | String getMessage() |
getValue | getValue() | String getValue() |
Completions#
class · extends Object · javax.annotation.processing.Completions
Methods
| Method | Ring call | Java overloads |
|---|---|---|
of | of(value)of([value,message])of([ :value = v, :message = v ]) | static Completion of(String value)static Completion of(String value, String message) |
The methods and fields of Object are inherited.
Filer#
interface · javax.annotation.processing.Filer
Methods
| Method | Ring call | Java overloads |
|---|---|---|
createClassFile | createClassFile(name,originatingElements) | JavaFileObject createClassFile(CharSequence name, Element[] originatingElements) |
createResource | createResource(location,moduleAndPkg,relativeName,originatingElements) | FileObject createResource(Location location, CharSequence moduleAndPkg, CharSequence relativeName, Element[] originatingElements) |
createSourceFile | createSourceFile(name,originatingElements) | JavaFileObject createSourceFile(CharSequence name, Element[] originatingElements) |
getResource | getResource(location,moduleAndPkg,relativeName) | FileObject getResource(Location location, CharSequence moduleAndPkg, CharSequence relativeName) |
FilerException#
class · extends IOException · javax.annotation.processing.FilerException
Constructors
new FilerException(String s) |
Ring: new FilerException(args) uses the constructor with the fewest parameters (at least one); new FilerException makes the object with the constructor without parameters; the others: (new FilerException).@New([ :param = value ]) or .@New([v1,v2]).
The methods and fields of IOException are inherited.
Messager#
interface · javax.annotation.processing.Messager
Methods
| Method | Ring call | Java overloads |
|---|---|---|
printError | printError(msg)printError([msg,e])printError([ :msg = v, :e = v ]) | void printError(CharSequence msg)void printError(CharSequence msg, Element e) |
printMessage | printMessage([kind,msg])printMessage([ :kind = v, :msg = v ])printMessage([kind,msg,e])printMessage([ :kind = v, :msg = v, :e = v ])printMessage([kind,msg,e,a])printMessage([ :kind = v, :msg = v, :e = v, :a = v ])printMessage([kind,msg,e,a,v])printMessage([ :kind = v, :msg = v, :e = v, :a = v, :v = v ]) | void printMessage(Kind kind, CharSequence msg)void printMessage(Kind kind, CharSequence msg, Element e)void printMessage(Kind kind, CharSequence msg, Element e, AnnotationMirror a)void printMessage(Kind kind, CharSequence msg, Element e, AnnotationMirror a, AnnotationValue v) |
printNote | printNote(msg)printNote([msg,e])printNote([ :msg = v, :e = v ]) | void printNote(CharSequence msg)void printNote(CharSequence msg, Element e) |
printWarning | printWarning(msg)printWarning([msg,e])printWarning([ :msg = v, :e = v ]) | void printWarning(CharSequence msg)void printWarning(CharSequence msg, Element e) |
ProcessingEnvironment#
interface · javax.annotation.processing.ProcessingEnvironment
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getElementUtils | getElementUtils() | Elements getElementUtils() |
getFiler | getFiler() | Filer getFiler() |
getLocale | getLocale() | Locale getLocale() |
getMessager | getMessager() | Messager getMessager() |
getOptions | getOptions() | Map getOptions() |
getSourceVersion | getSourceVersion() | SourceVersion getSourceVersion() |
getTypeUtils | getTypeUtils() | Types getTypeUtils() |
isPreviewEnabled | isPreviewEnabled() | boolean isPreviewEnabled() |
Processor#
interface · javax.annotation.processing.Processor
Methods
| Method | Ring call | Java overloads |
|---|---|---|
@init | @init(processingEnv) | void init(ProcessingEnvironment processingEnv) |
getCompletions | getCompletions(element,annotation,member,userText) | Iterable getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText) |
getSupportedAnnotationTypes | getSupportedAnnotationTypes() | Set getSupportedAnnotationTypes() |
getSupportedOptions | getSupportedOptions() | Set getSupportedOptions() |
getSupportedSourceVersion | getSupportedSourceVersion() | SourceVersion getSupportedSourceVersion() |
process | process(annotations,roundEnv) | boolean process(Set annotations, RoundEnvironment roundEnv) |
RoundEnvironment#
interface · javax.annotation.processing.RoundEnvironment
Methods
| Method | Ring call | Java overloads |
|---|---|---|
errorRaised | errorRaised() | boolean errorRaised() |
getElementsAnnotatedWith | getElementsAnnotatedWith(a) | Set getElementsAnnotatedWith(Class a)Set getElementsAnnotatedWith(TypeElement a) |
getElementsAnnotatedWithAny | getElementsAnnotatedWithAny(annotations) | Set getElementsAnnotatedWithAny(TypeElement[] annotations)Set getElementsAnnotatedWithAny(Set annotations) |
getRootElements | getRootElements() | Set getRootElements() |
processingOver | processingOver() | boolean processingOver() |