本文整理汇总了Java中org.apache.commons.digester.RuleSetBase类的典型用法代码示例。如果您正苦于以下问题:Java RuleSetBase类的具体用法?Java RuleSetBase怎么用?Java RuleSetBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RuleSetBase类属于org.apache.commons.digester包,在下文中一共展示了RuleSetBase类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readRuleSet
import org.apache.commons.digester.RuleSetBase; //导入依赖的package包/类
protected RuleSet readRuleSet()
{
return new RuleSetBase()
{
@Override
public void addRuleInstances(Digester digester)
{
digester.addObjectCreate(PATTERN_ROOT, JRSimpleTemplate.class);
digester.addCallMethod(PATTERN_INCLUDED_TEMPLATE, "addIncludedTemplate", 0);
digester.addFactoryCreate(PATTERN_STYLE, JRTemplateStyleFactory.class);
digester.addSetNext(PATTERN_STYLE, "addStyle", JRStyle.class.getName());
digester.addFactoryCreate(PATTERN_STYLE_PEN, JRPenFactory.Style.class.getName());
digester.addFactoryCreate(PATTERN_BOX, JRBoxFactory.class.getName());
digester.addFactoryCreate(PATTERN_BOX_PEN, JRPenFactory.Box.class.getName());
digester.addFactoryCreate(PATTERN_BOX_TOP_PEN, JRPenFactory.Top.class.getName());
digester.addFactoryCreate(PATTERN_BOX_LEFT_PEN, JRPenFactory.Left.class.getName());
digester.addFactoryCreate(PATTERN_BOX_BOTTOM_PEN, JRPenFactory.Bottom.class.getName());
digester.addFactoryCreate(PATTERN_BOX_RIGHT_PEN, JRPenFactory.Right.class.getName());
digester.addFactoryCreate(PATTERN_PARAGRAPH, JRParagraphFactory.class.getName());
digester.addFactoryCreate(PATTERN_TAB_STOP, TabStopFactory.class.getName());
digester.addSetNext(PATTERN_TAB_STOP, "addTabStop", TabStop.class.getName());
}
};
}