A - the Plugin annotation type.PluginVisitor<A>PluginAttributeVisitor, PluginBuilderAttributeVisitor, PluginConfigurationVisitor, PluginElementVisitor, PluginNodeVisitor, PluginValueVisitorpublic abstract class AbstractPluginVisitor<A extends Annotation> extends Object implements PluginVisitor<A>
visit method.| Modifier and Type | Field | Description |
|---|---|---|
protected String[] |
aliases |
|
protected A |
annotation |
|
protected Class<A> |
clazz |
|
protected Class<?> |
conversionType |
|
protected static Logger |
LOGGER |
Status logger.
|
protected Member |
member |
|
protected StrSubstitutor |
substitutor |
| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractPluginVisitor(Class<A> clazz) |
This constructor must be overridden by implementation classes as a no-arg constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected Object |
convert(String value,
Object defaultValue) |
Converts the given value into the configured type falling back to the provided default value.
|
protected static String |
removeAttributeValue(Map<String,String> attributes,
String name,
String... aliases) |
Removes an Entry from a given Map using a key name and aliases for that key.
|
PluginVisitor<A> |
setAliases(String... someAliases) |
Sets the list of aliases to use for this visit.
|
PluginVisitor<A> |
setAnnotation(Annotation anAnnotation) |
Sets the Annotation to be used for this.
|
PluginVisitor<A> |
setConversionType(Class<?> aConversionType) |
Sets the class to convert the plugin value to on this visit.
|
PluginVisitor<A> |
setMember(Member aMember) |
Sets the Member that this visitor is being used for injection upon.
|
PluginVisitor<A> |
setStrSubstitutor(StrSubstitutor aSubstitutor) |
Sets the StrSubstitutor to use for converting raw strings before type conversion.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvisitprotected static final Logger LOGGER
protected final Class<A extends Annotation> clazz
protected A extends Annotation annotation
protected String[] aliases
protected Class<?> conversionType
protected StrSubstitutor substitutor
protected Member member
public PluginVisitor<A> setAnnotation(Annotation anAnnotation)
PluginVisitorsetAnnotation in interface PluginVisitor<A extends Annotation>anAnnotation - the Annotation instance.this.public PluginVisitor<A> setAliases(String... someAliases)
PluginVisitorsetAliases in interface PluginVisitor<A extends Annotation>someAliases - the list of aliases to use.this.public PluginVisitor<A> setConversionType(Class<?> aConversionType)
PluginVisitorsetConversionType in interface PluginVisitor<A extends Annotation>aConversionType - the type to convert the plugin string to (if applicable).this.public PluginVisitor<A> setStrSubstitutor(StrSubstitutor aSubstitutor)
PluginVisitorConfiguration.setStrSubstitutor in interface PluginVisitor<A extends Annotation>aSubstitutor - the StrSubstitutor to use on plugin values.this.public PluginVisitor<A> setMember(Member aMember)
PluginVisitorsetMember in interface PluginVisitor<A extends Annotation>aMember - the member this visitor is parsing a value for.this.protected static String removeAttributeValue(Map<String,String> attributes, String name, String... aliases)
attributes - the Map to remove an Entry from.name - the key name to look up.aliases - optional aliases of the key name to look up.null if nonexistent.protected Object convert(String value, Object defaultValue)
value - the value to convert.defaultValue - the fallback value to use in case of no value or an error.Copyright © 1999-2018. 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.