Package org.apache.commons.digester3

Examples of org.apache.commons.digester3.RulesBase


    @Before
    public void setUp()
    {

        digester = new Digester();
        digester.setRules( new RulesBase() );

    }
View Full Code Here


     *
     * @return the matching rules to be tested.
     */
    protected Rules createMatchingRulesForTest()
    {
        return new RulesBase();
    }
View Full Code Here

    @Test
    public void testClear()
    {
        // test clear wrapped
        WithDefaultsRulesWrapper rules = new WithDefaultsRulesWrapper( new RulesBase() );
        rules.add( "alpha", new TestRule( "Tom" ) );
        rules.add( "alpha", new TestRule( "Dick" ) );
        rules.add( "alpha", new TestRule( "Harry" ) );

        assertNotNull( "Rules should not be null", rules.rules() );
View Full Code Here

    @Test
    public void testRules()
    {
        // test rules
        WithDefaultsRulesWrapper rules = new WithDefaultsRulesWrapper( new RulesBase() );
        rules.add( "alpha", new TestRule( "Tom" ) );
        rules.add( "alpha", new TestRule( "Dick" ) );
        rules.addDefault( new TestRule( "Roger" ) );
        rules.add( "alpha", new TestRule( "Harry" ) );
View Full Code Here

    @Test
    public void testMatch()
    {
        // test no defaults
        WithDefaultsRulesWrapper rules = new WithDefaultsRulesWrapper( new RulesBase() );
        rules.add( "alpha", new TestRule( "Tom" ) );
        rules.add( "alpha", new TestRule( "Dick" ) );
        rules.add( "alpha", new TestRule( "Harry" ) );
        rules.addDefault( new TestRule( "Roger" ) );
        rules.addDefault( new TestRule( "Rabbit" ) );
View Full Code Here

     * Constructor for top-level Rules objects. Exactly one of these must be created and installed into the Digester
     * instance as the Rules object before parsing starts.
     */
    public PluginRules()
    {
        this( new RulesBase() );
    }
View Full Code Here

        this.parent = parent;
        this.rulesFactory = parent.rulesFactory;

        if ( rulesFactory == null )
        {
            decoratedRules = new RulesBase();
        }
        else
        {
            decoratedRules = rulesFactory.newRules( digester, pluginClass );
        }
View Full Code Here

     *
     * @return a new {@link Digester} instance
     */
    public Digester newDigester()
    {
        return this.newDigester( new RulesBase() );
    }
View Full Code Here

     * @param parser the user defined {@code SAXParser}
     * @return a new {@link Digester} instance
     */
    public Digester newDigester( SAXParser parser )
    {
        return newDigester( parser, new RulesBase() );
    }
View Full Code Here

     * @param reader The user defined {@code XMLReader}
     * @return a new {@link Digester} instance
     */
    public Digester newDigester( XMLReader reader )
    {
        return this.newDigester( reader, new RulesBase() );
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.digester3.RulesBase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.