org.docx4j.utils.SingleTraversalUtilVisitorCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docx4j-core Show documentation
Show all versions of docx4j-core Show documentation
docx4j is a library which helps you to work with the Office Open
XML file format as used in docx
documents, pptx presentations, and xlsx spreadsheets.
package org.docx4j.utils;
import org.docx4j.XmlUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* Use this if there is only a single object type (eg just P's)
* you are interested in doing something with.
*
* For an example of use, see sample ImageConvertEmbeddedToLinked
*
* @author alberto */
public class SingleTraversalUtilVisitorCallback extends AbstractTraversalUtilVisitorCallback {
protected static Logger log = LoggerFactory.getLogger(SingleTraversalUtilVisitorCallback.class);
protected TraversalUtilVisitor visitor = null;
protected Class visitorClass = null;
public SingleTraversalUtilVisitorCallback(TraversalUtilVisitor visitor) {
this.visitor = visitor;
visitorClass = findClassParameter(visitor.getClass());
if (visitorClass == null) {
throw new IllegalArgumentException("Can't identify the parameter class of the visitor " + visitor.getClass().getName());
}
}
@Override
protected List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy