Class PluginProcessor
java.lang.Object
javax.annotation.processing.AbstractProcessor
org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
- All Implemented Interfaces:
Processor
@SupportedAnnotationTypes("org.apache.logging.log4j.core.config.plugins.*")
public class PluginProcessor
extends AbstractProcessor
Annotation processor for pre-scanning Log4j 2 plugins.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
ElementVisitor to scan the PluginAliases annotation.private static class
ElementVisitor to scan the Plugin annotation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Element[]
static final String
The location of the plugin cache data file.private final PluginCache
Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
collectPlugins
(Iterable<? extends Element> elements) private void
error
(CharSequence message) boolean
process
(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) private void
writeCacheFile
(Element... elements) Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, init, isInitialized
-
Field Details
-
EMPTY_ELEMENT_ARRAY
-
PLUGIN_CACHE_FILE
The location of the plugin cache data file. This file is written to by this processor, and read from byPluginManager
.- See Also:
-
pluginCache
-
-
Constructor Details
-
PluginProcessor
public PluginProcessor()
-
-
Method Details
-
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersion
in interfaceProcessor
- Overrides:
getSupportedSourceVersion
in classAbstractProcessor
-
process
- Specified by:
process
in interfaceProcessor
- Specified by:
process
in classAbstractProcessor
-
error
-
collectPlugins
-
writeCacheFile
- Throws:
IOException
-