Processorpublic abstract class AbstractProcessor extends Object implements Processor
The getter methods may issue warnings about noteworthy conditions using the facilities available after the processor has been initialized.
Subclasses are free to override the implementation and specification of any of the methods in this class as long as the general Processor contract for that method is obeyed.
| Modifier and Type | Field | Description | 
|---|---|---|
| protected ProcessingEnvironment | processingEnv | Processing environment providing by the tool framework. | 
| Modifier | Constructor | Description | 
|---|---|---|
| protected  | Constructor for subclasses to call. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| Iterable | getCompletions | Returns an empty iterable of completions. | 
| Set | getSupportedAnnotationTypes() | If the processor class is annotated with  SupportedAnnotationTypes, return an unmodifiable set with the same set of strings as the annotation. | 
| Set | getSupportedOptions() | If the processor class is annotated with  SupportedOptions, return an unmodifiable set with the same set of strings as the annotation. | 
| SourceVersion | getSupportedSourceVersion() | If the processor class is annotated with  SupportedSourceVersion, return the source version in the annotation. | 
| void | init | Initializes the processor with the processing environment by setting the  processingEnvfield to the value of theprocessingEnvargument. | 
| protected boolean | isInitialized() | 
protected ProcessingEnvironment processingEnv
protected AbstractProcessor()
public Set<String> getSupportedOptions()
SupportedOptions, return an unmodifiable set with the same set of strings as the annotation. If the class is not so annotated, an empty set is returned.getSupportedOptions in interface Processor
public Set<String> getSupportedAnnotationTypes()
SupportedAnnotationTypes, return an unmodifiable set with the same set of strings as the annotation. If the class is not so annotated, an empty set is returned. If the source version does not support modules, in other words if it is less than or equal to RELEASE_8, then any leading module prefixes are stripped from the names.getSupportedAnnotationTypes in interface Processor
public SourceVersion getSupportedSourceVersion()
SupportedSourceVersion, return the source version in the annotation. If the class is not so annotated, SourceVersion.RELEASE_6 is returned.getSupportedSourceVersion in interface Processor
public void init(ProcessingEnvironment processingEnv)
processingEnv field to the value of the processingEnv argument. An 
 IllegalStateException will be thrown if this method is called more than once on the same object.init in interface Processor
processingEnv - environment to access facilities the tool framework provides to the processorIllegalStateException - if this method is called more than once.public Iterable<? extends Completion> getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText)
getCompletions in interface Processor
element - the element being annotatedannotation - the (perhaps partial) annotation being applied to the elementmember - the annotation member to return possible completions foruserText - source code text to be completedprotected boolean isInitialized()
true if this object has been initialized, false otherwise
    © 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
    https://docs.oracle.com/en/java/javase/21/docs/api/java.compiler/javax/annotation/processing/AbstractProcessor.html