Top Description Methods
org.apache.tomcat.util.digester

public Interface Rules

Known Direct Implementers
org.apache.tomcat.util.digester.RulesBase
Imports
java.util.List

Public interface defining a collection of Rule instances (and corresponding matching patterns) plus an implementation of a matching policy that selects the rules that match a particular pattern of nested elements discovered during parsing.

Method Summary

Modifier and TypeMethod and Description
public void
add(String
Nesting pattern to be matched for this Rule
pattern
,
Rule
Rule instance to be registered
rule
)

Register a new Rule instance matching the specified pattern.

public void
clear()

Clear all existing Rule instance registrations.

public Digester

Returns:

the Digester instance with which this Rules instance is associated.
getDigester
()

public List<Rule>

Returns:

a rules list
match
(String
Namespace URI for which to select matching rules, or null to match regardless of namespace URI
namespaceURI
,
String
Nesting pattern to be matched
pattern
)

Return a List of all registered Rule instances that match the specified nesting pattern, or a zero-length List if there are no matches.

public List<Rule>

Returns:

a rules list
rules
()

Return a List of all registered Rule instances, or a zero-length List if there are no registered Rule instances.

public void
setDigester(Digester
The newly associated Digester instance
digester
)

Set the Digester instance with which this Rules instance is associated.

Method Detail

addback to summary
public void add(String pattern, Rule rule)

Register a new Rule instance matching the specified pattern.

Parameters
pattern:String

Nesting pattern to be matched for this Rule

rule:Rule

Rule instance to be registered

clearback to summary
public void clear()

Clear all existing Rule instance registrations.

getDigesterback to summary
public Digester getDigester()
Returns:Digester

the Digester instance with which this Rules instance is associated.

matchback to summary
public List<Rule> match(String namespaceURI, String pattern)

Return a List of all registered Rule instances that match the specified nesting pattern, or a zero-length List if there are no matches. If more than one Rule instance matches, they must be returned in the order originally registered through the add() method.

Parameters
namespaceURI:String

Namespace URI for which to select matching rules, or null to match regardless of namespace URI

pattern:String

Nesting pattern to be matched

Returns:List<Rule>

a rules list

rulesback to summary
public List<Rule> rules()

Return a List of all registered Rule instances, or a zero-length List if there are no registered Rule instances. If more than one Rule instance has been registered, they must be returned in the order originally registered through the add() method.

Returns:List<Rule>

a rules list

setDigesterback to summary
public void setDigester(Digester digester)

Set the Digester instance with which this Rules instance is associated.

Parameters
digester:Digester

The newly associated Digester instance