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.AbstractProcessorAnnotation processor for pre-scanning Log4j 2 plugins.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classPluginProcessor.PluginAliasesElementVisitorElementVisitor to scan the PluginAliases annotation.private static classPluginProcessor.PluginElementVisitorElementVisitor to scan the Plugin annotation.
-
Field Summary
Fields Modifier and Type Field Description private static javax.lang.model.element.Element[]EMPTY_ELEMENT_ARRAYstatic java.lang.StringPLUGIN_CACHE_FILEThe location of the plugin cache data file.private PluginCachepluginCache
-
Constructor Summary
Constructors Constructor Description PluginProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcollectPlugins(java.lang.Iterable<? extends javax.lang.model.element.Element> elements)private voiderror(java.lang.CharSequence message)javax.lang.model.SourceVersiongetSupportedSourceVersion()booleanprocess(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)private voidwriteCacheFile(javax.lang.model.element.Element... elements)
-
-
-
Field Detail
-
EMPTY_ELEMENT_ARRAY
private static final javax.lang.model.element.Element[] EMPTY_ELEMENT_ARRAY
-
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:
getSupportedSourceVersionin interfacejavax.annotation.processing.Processor- Overrides:
getSupportedSourceVersionin 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:
processin interfacejavax.annotation.processing.Processor- Specified by:
processin 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
-
-