A
- the Annotation type.public interface PluginVisitor<A extends Annotation>
Node
, doing any relevant type conversion, and returning a
parsed value for that variable. Implementations must be constructable using the default constructor.Modifier and Type | Method and Description |
---|---|
PluginVisitor<A> |
setAliases(String... aliases)
Sets the list of aliases to use for this visit.
|
PluginVisitor<A> |
setAnnotation(Annotation annotation)
Sets the Annotation to be used for this.
|
PluginVisitor<A> |
setConversionType(Class<?> conversionType)
Sets the class to convert the plugin value to on this visit.
|
PluginVisitor<A> |
setMember(Member member)
Sets the Member that this visitor is being used for injection upon.
|
PluginVisitor<A> |
setStrSubstitutor(StrSubstitutor substitutor)
Sets the StrSubstitutor to use for converting raw strings before type conversion.
|
Object |
visit(Configuration configuration,
Node node,
LogEvent event,
StringBuilder log)
Visits a Node to obtain a value for constructing a Plugin object.
|
PluginVisitor<A> setAnnotation(Annotation annotation)
annotation
- the Annotation instance.this
.NullPointerException
- if the argument is null
.PluginVisitor<A> setAliases(String... aliases)
aliases
- the list of aliases to use.this
.PluginVisitor<A> setConversionType(Class<?> conversionType)
conversionType
- the type to convert the plugin string to (if applicable).this
.NullPointerException
- if the argument is null
.PluginVisitor<A> setStrSubstitutor(StrSubstitutor substitutor)
Configuration
.substitutor
- the StrSubstitutor to use on plugin values.this
.NullPointerException
- if the argument is null
.PluginVisitor<A> setMember(Member member)
member
- the member this visitor is parsing a value for.this
.Object visit(Configuration configuration, Node node, LogEvent event, StringBuilder log)
configuration
- the current Configuration.node
- the current Node corresponding to the Plugin object being created.event
- the current LogEvent that caused this Plugin object to be made (optional).log
- the StringBuilder being used to build a debug message.Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.