本文整理汇总了Java中org.apache.commons.digester.SetPropertiesRule类的典型用法代码示例。如果您正苦于以下问题:Java SetPropertiesRule类的具体用法?Java SetPropertiesRule怎么用?Java SetPropertiesRule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SetPropertiesRule类属于org.apache.commons.digester包,在下文中一共展示了SetPropertiesRule类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDigester
import org.apache.commons.digester.SetPropertiesRule; //导入依赖的package包/类
protected static Digester getDigester() {
Digester digester = new Digester();
digester.setValidating(false);
digester.addObjectCreate("feeds", Feeds.class);
digester.addSetProperties("feeds");
digester.addObjectCreate("feeds/handler", Handler.class);
digester.addSetProperties("feeds/handler");
digester.addRule("feeds/handler", new SetPropertiesRule(new String[] {"class"}, new String[] {"clazz"}));
digester.addSetNext("feeds/handler", "addHandler");
digestProperties(digester, "feeds/handler/property");
digester.addObjectCreate("feeds/feed", Feed.class);
digester.addSetProperties("feeds/feed");
digester.addSetNext("feeds/feed", "addFeed");
digester.addObjectCreate("feeds/feed/filter", Filter.class);
digester.addSetProperties("feeds/feed/filter");
digester.addRule("feeds/feed/filter", new SetPropertiesRule(new String[] {"class"}, new String[] {"clazz"}));
digester.addSetNext("feeds/feed/filter", "addFilter");
digestProperties(digester, "feeds/feed/filter/property");
digester.addObjectCreate("feeds/feed/handler", Handler.class);
digester.addSetProperties("feeds/feed/handler");
digester.addRule("feeds/feed/handler", new SetPropertiesRule(new String[] {"class"}, new String[] {"clazz"}));
digester.addSetNext("feeds/feed/handler", "addHandler");
digestProperties(digester, "feeds/feed/handler/property");
return digester;
}