Class DefaultTagWorkerFactory
java.lang.Object
com.itextpdf.html2pdf.attach.impl.DefaultTagWorkerFactory
- All Implemented Interfaces:
-
ITagWorkerFactory
The default implementation of a tag worker factory, mapping tags to tag worker implementations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCustomTagWorker(com.itextpdf.styledxmlparser.node.IElementNode tag, ProcessorContext context) This is a hook method.static ITagWorkerFactoryGetsITagWorkerFactoryinstance.final ITagWorkergetTagWorker(com.itextpdf.styledxmlparser.node.IElementNode tag, ProcessorContext context)
-
Constructor Details
-
DefaultTagWorkerFactory
public DefaultTagWorkerFactory()Instantiates a new default tag worker factory.
-
-
Method Details
-
getInstance
GetsITagWorkerFactoryinstance.- Returns:
- default instance that is used if custom tag workers are not configured
-
getTagWorker
public final ITagWorker getTagWorker(com.itextpdf.styledxmlparser.node.IElementNode tag, ProcessorContext context) - Specified by:
-
getTagWorkerin interfaceITagWorkerFactory - Parameters:
-
tag- IElementNode -
context- ProcessorContext - Returns:
-
a
ITagWorkerinstance constructed based on the passed parameters.
-
getCustomTagWorker
public ITagWorker getCustomTagWorker(com.itextpdf.styledxmlparser.node.IElementNode tag, ProcessorContext context) This is a hook method. Users wanting to provide a custom mapping or introduce their own ITagWorkers should implement this method.- Parameters:
-
tag- the tag -
context- the context - Returns:
- the custom tag worker
-