TagProcessorFactorypublic class DefaultTagProcessorFactory extends java.lang.Object implements TagProcessorFactory
ClassLoaders this Processor can
also load the processors when they are only stored with there fully qualified
class names.| Modifier and Type | Class | Description |
|---|---|---|
protected class |
DefaultTagProcessorFactory.FactoryObject |
Internal Object to keep TagProcessors.
|
| Constructor | Description |
|---|---|
DefaultTagProcessorFactory() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addProcessor(TagProcessor processor,
java.lang.String... tags) |
Add a tag processor and the tags it maps to.
|
void |
addProcessor(java.lang.String tag,
TagProcessor processor) |
Add a loaded TagProcessor.
|
void |
addProcessor(java.lang.String tag,
java.lang.String className) |
Add an unloaded TagProcessor.
|
void |
addProcessor(java.lang.String className,
java.lang.String... tags) |
Add one tag processor that handles multiple tags.
|
TagProcessor |
getProcessor(java.lang.String tag,
java.lang.String nameSpace) |
Looks up a TagProcessor for the given tag.
|
protected TagProcessor |
load(java.lang.String className) |
Tries to load given processor with Class.forName
|
protected TagProcessor |
load(java.lang.String className,
java.lang.ClassLoader loader) |
Tries to load given processor with Class.forName
|
void |
removeProcessor(java.lang.String tag) |
Removes a TagProcessor for a specific tag.
|
protected TagProcessor load(java.lang.String className) throws NoTagProcessorException
className - fully qualified classNameNoTagProcessorException - if TagProcessor could not be loaded.protected TagProcessor load(java.lang.String className, java.lang.ClassLoader loader) throws NoTagProcessorException
className - fully qualified classNameloader - the classloader to useNoTagProcessorException - if TagProcessor could not be loaded.public TagProcessor getProcessor(java.lang.String tag, java.lang.String nameSpace)
TagProcessorFactorygetProcessor in interface TagProcessorFactorytag - the tag to find a processor for.nameSpace - the namespaceTagProcessor mapped to this tag.NoTagProcessorException - when the processor was not found for the given tag.public void addProcessor(java.lang.String tag,
java.lang.String className)
tag - the tag the processor with the given className maps toclassName - the fully qualified class name (class has to be found on classpath, will be loaded with Class.forName()public void addProcessor(java.lang.String tag,
TagProcessor processor)
tag - the tag the processor with the given className maps toprocessor - the TagProcessorpublic void addProcessor(TagProcessor processor, java.lang.String... tags)
TagProcessorFactoryaddProcessor in interface TagProcessorFactoryprocessor - the TagProcessor.tags - tags this processor maps to.public void addProcessor(java.lang.String className,
java.lang.String... tags)
className - the fully qualified class name (class has to be found on classpath)tags - list of tags this processor maps to.public void removeProcessor(java.lang.String tag)
TagProcessorFactoryremoveProcessor in interface TagProcessorFactorytag - the tag to remove the processor for.Copyright © 1998–2018. All rights reserved.