Javadoc
Invokes a static factory method to either create the desired object or to create a builder object that creates
the desired object. In the case of a factory method, it should be annotated with
org.apache.logging.log4j.core.config.plugins.PluginFactory, and each parameter should be annotated with
an appropriate plugin annotation depending on what that parameter describes. Parameters annotated with
org.apache.logging.log4j.core.config.plugins.PluginAttribute must be a type that can be converted from a
string using one of the
org.apache.logging.log4j.core.config.plugins.convert.TypeConverter. Parameters with
org.apache.logging.log4j.core.config.plugins.PluginElement may be any plugin class or
an array of a plugin class. Collections and Maps are currently not supported, although the factory method that is
called can create these from an array.
Plugins can also be created using a builder class that implements
org.apache.logging.log4j.core.util.Builder. In that case, a static method annotated with
org.apache.logging.log4j.core.config.plugins.PluginBuilderAttribute should create the builder class, and
the various fields in the builder class should be annotated similarly to the method parameters. However, instead
of using PluginAttribute, one should use
org.apache.logging.log4j.core.config.plugins.PluginBuilderAttribute where the default value can be
specified as the default field value instead of as an additional annotation parameter.
In either case, there are also annotations for specifying a
org.apache.logging.log4j.core.config.Configuration (
org.apache.logging.log4j.core.config.plugins.PluginConfiguration) or a
org.apache.logging.log4j.core.config.Node (
org.apache.logging.log4j.core.config.plugins.PluginNode).
Although the happy path works, more work still needs to be done to log incorrect parameters. These will generally
result in unhelpful InvocationTargetExceptions.