package me.chyxion.tigon.mybatis;

import org.w3c.dom.Document;
import org.apache.ibatis.parsing.XPathParser;

/**
 * @author Shaun Chyxion <br>
 * chyxion@163.com <br>
 * Feb 21, 2017 17:42:43
 */
public interface MapperXmlProcessor {

    /**
     * accept process
     * @param mapperClass mapper class
     * @param xPathParser xpath parser
     * @return true if accept process
     */
    boolean accept(Class<BaseMapper<?, ?>> mapperClass, XPathParser xPathParser);

    /**
     * process document
     * @param mapperClass mapper class
     * @param document mapper xml document
     */
    void process(Class<BaseMapper<?, ?>> mapperClass, Document document);
}
