|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.itextpdf.tool.xml.html.DefaultTagProcessorFactory
public class DefaultTagProcessorFactory
A Default implementation of the TagProcessorFactory that uses a map to store
the TagProcessors. Within the same ClassLoader
s this Processor can
also load the processors when they are only stored with there fully qualified
class names.
Note: this implementation does not use namespaces (yet)!
Nested Class Summary | |
---|---|
protected class |
DefaultTagProcessorFactory.FactoryObject
Internal Object to keep TagProcessors. |
Constructor Summary | |
---|---|
DefaultTagProcessorFactory()
|
Method Summary | |
---|---|
void |
addProcessor(String className,
String... tags)
Add one tag processor that handles multiple tags. |
void |
addProcessor(String tag,
String className)
Add an unloaded TagProcessor. |
void |
addProcessor(String tag,
TagProcessor processor)
Add a loaded TagProcessor. |
void |
addProcessor(TagProcessor processor,
String... tags)
Add a tag processor and the tags it maps to. |
TagProcessor |
getProcessor(String tag,
String nameSpace)
Looks up a TagProcessor for the given tag. |
protected TagProcessor |
load(String className)
Tries to load given processor with Class.forName |
protected TagProcessor |
load(String className,
ClassLoader loader)
Tries to load given processor with Class.forName |
void |
removeProcessor(String tag)
Removes a TagProcessor for a specific tag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultTagProcessorFactory()
Method Detail |
---|
protected TagProcessor load(String className) throws NoTagProcessorException
className
- fully qualified className
NoTagProcessorException
- if TagProcessor could not be loaded.protected TagProcessor load(String className, ClassLoader loader) throws NoTagProcessorException
className
- fully qualified classNameloader
- the classloader to use
NoTagProcessorException
- if TagProcessor could not be loaded.public TagProcessor getProcessor(String tag, String nameSpace)
TagProcessorFactory
getProcessor
in interface TagProcessorFactory
tag
- the tag to find a processor for.nameSpace
- the namespace
TagProcessor
mapped to this tag.
NoTagProcessorException
- when the processor was not found for the given tag.public void addProcessor(String tag, 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(String tag, TagProcessor processor)
tag
- the tag the processor with the given className maps toprocessor
- the TagProcessorpublic void addProcessor(TagProcessor processor, String... tags)
TagProcessorFactory
addProcessor
in interface TagProcessorFactory
processor
- the TagProcessor.tags
- tags this processor maps to.public void addProcessor(String className, 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(String tag)
TagProcessorFactory
removeProcessor
in interface TagProcessorFactory
tag
- the tag to remove the processor for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |