in commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginRules.java [368:401]
public List<Rule> match( final String namespaceURI, final String path, final String name, final Attributes attributes )
{
final Log log = LogUtils.getLogger( digester );
final boolean debug = log.isDebugEnabled();
if ( debug )
{
log.debug( "Matching path [" + path + "] on rules object " + this.toString() );
}
List<Rule> matches;
if ( ( mountPoint != null ) && ( path.length() <= mountPoint.length() ) )
{
if ( debug )
{
log.debug( "Path [" + path + "] delegated to parent." );
}
matches = parent.match( namespaceURI, path, name, attributes );
// Note that in the case where path equals mountPoint,
// we deliberately return only the rules from the parent,
// even though this object may hold some rules matching
// this same path. See PluginCreateRule's begin, body and end
// methods for the reason.
}
else
{
log.debug( "delegating to decorated rules." );
matches = decoratedRules.match( namespaceURI, path, name, attributes );
}
return matches;
}