001    package org.apache.commons.digester3;
002    
003    /*
004     * Licensed to the Apache Software Foundation (ASF) under one
005     * or more contributor license agreements.  See the NOTICE file
006     * distributed with this work for additional information
007     * regarding copyright ownership.  The ASF licenses this file
008     * to you under the Apache License, Version 2.0 (the
009     * "License"); you may not use this file except in compliance
010     * with the License.  You may obtain a copy of the License at
011     *
012     *   http://www.apache.org/licenses/LICENSE-2.0
013     *
014     * Unless required by applicable law or agreed to in writing,
015     * software distributed under the License is distributed on an
016     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017     * KIND, either express or implied.  See the License for the
018     * specific language governing permissions and limitations
019     * under the License.
020     */
021    
022    import org.xml.sax.Attributes;
023    
024    /**
025     * Defines a functor interface implemented by classes that perform a predicate test
026     *
027     * @since 3.0
028     */
029    public interface RuleMatcher
030    {
031    
032        /**
033         * Use the specified parameter to perform a test.
034         *
035         * @param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace
036         *            aware or the element has no namespace
037         * @param pattern Nesting pattern to be matched for this Rule
038         * @param name the local name if the parser is namespace aware, or just the element name otherwise
039         * @param attributes The attribute list of this element
040         * @return true, if the test succeeds, false otherwise
041         */
042        boolean match( String namespace, String pattern, String name, Attributes attributes );
043    
044    }