Class PluginProcessor
- java.lang.Object
-
- javax.annotation.processing.AbstractProcessor
-
- org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
-
- All Implemented Interfaces:
javax.annotation.processing.Processor
@SupportedAnnotationTypes("org.apache.logging.log4j.core.config.plugins.*") public class PluginProcessor extends javax.annotation.processing.AbstractProcessor
Annotation processor for pre-scanning Log4j 2 plugins.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
PluginProcessor.PluginAliasesElementVisitor
ElementVisitor to scan the PluginAliases annotation.private static class
PluginProcessor.PluginElementVisitor
ElementVisitor to scan the Plugin annotation.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PLUGIN_CACHE_FILE
The location of the plugin cache data file.private PluginCache
pluginCache
-
Constructor Summary
Constructors Constructor Description PluginProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
collectPlugins(java.lang.Iterable<? extends javax.lang.model.element.Element> elements)
private void
error(java.lang.CharSequence message)
javax.lang.model.SourceVersion
getSupportedSourceVersion()
boolean
process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)
private void
writeCacheFile(javax.lang.model.element.Element... elements)
-
-
-
Field Detail
-
PLUGIN_CACHE_FILE
public static final java.lang.String 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:
- Constant Field Values
-
pluginCache
private final PluginCache pluginCache
-
-
Method Detail
-
getSupportedSourceVersion
public javax.lang.model.SourceVersion getSupportedSourceVersion()
- Specified by:
getSupportedSourceVersion
in interfacejavax.annotation.processing.Processor
- Overrides:
getSupportedSourceVersion
in classjavax.annotation.processing.AbstractProcessor
-
process
public boolean process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)
- Specified by:
process
in interfacejavax.annotation.processing.Processor
- Specified by:
process
in classjavax.annotation.processing.AbstractProcessor
-
error
private void error(java.lang.CharSequence message)
-
collectPlugins
private void collectPlugins(java.lang.Iterable<? extends javax.lang.model.element.Element> elements)
-
writeCacheFile
private void writeCacheFile(javax.lang.model.element.Element... elements) throws java.io.IOException
- Throws:
java.io.IOException
-
-