Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import javax.tools.StandardLocation;
import org.apache.logging.log4j.core.config.plugins.Plugin;
import org.apache.logging.log4j.core.config.plugins.PluginAliases;
import org.apache.logging.log4j.core.config.plugins.PluginBuilderAttribute;
import org.apache.logging.log4j.util.Strings;

/**
Expand Down Expand Up @@ -84,9 +83,13 @@ public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latest();
}

private static final String PLUGIN_BUILDER_ATTRIBUTE_ANNOTATION =
"org.apache.logging.log4j.core.config.plugins.PluginBuilderAttribute";

@Override
public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
final Messager messager = processingEnv.getMessager();
final Elements elementUtils = processingEnv.getElementUtils();
// Process the elements for this round
if (!annotations.isEmpty()) {
final Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(Plugin.class);
Expand All @@ -95,7 +98,8 @@ public boolean process(final Set<? extends TypeElement> annotations, final Round

// process plugin builder Attributes
final Set<? extends Element> pluginAttributeBuilderElements =
roundEnv.getElementsAnnotatedWith(PluginBuilderAttribute.class);
roundEnv.getElementsAnnotatedWith(
elementUtils.getTypeElement(PLUGIN_BUILDER_ATTRIBUTE_ANNOTATION));
processBuilderAttribute(pluginAttributeBuilderElements);
processedElements.addAll(pluginAttributeBuilderElements);
}
Expand Down