All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.feilong.lib.digester3.xmlrules.AbstractXmlMethodRule Maven / Gradle / Ivy

Go to download

feilong is a suite of core and expanded libraries that include utility classes, http, excel,cvs, io classes, and much much more.

There is a newer version: 4.0.8
Show newest version
package com.feilong.lib.digester3.xmlrules;

import org.xml.sax.Attributes;

import com.feilong.lib.digester3.binder.LinkedRuleBuilder;
import com.feilong.lib.digester3.binder.RulesBinder;

/**
 * 
 */
abstract class AbstractXmlMethodRule extends AbstractXmlRule{

    public AbstractXmlMethodRule(RulesBinder targetRulesBinder, PatternStack patternStack){
        super(targetRulesBinder, patternStack);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected final void bindRule(LinkedRuleBuilder linkedRuleBuilder,Attributes attributes) throws Exception{
        String methodName = attributes.getValue("methodname");
        String paramType = attributes.getValue("paramtype");
        String exactMatch = attributes.getValue("exactMatch");
        String fireOnBegin = attributes.getValue("fireOnBegin");

        bindRule(linkedRuleBuilder, methodName, paramType, "true".equals(exactMatch), "true".equals(fireOnBegin));
    }

    /**
     * @param methodName
     */
    protected abstract void bindRule(
                    LinkedRuleBuilder linkedRuleBuilder,
                    String methodName,
                    String paramType,
                    boolean exactMatch,
                    boolean fireOnBegin);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy