MCPcopy Create free account
hub / github.com/apache/commons-digester / Rules

Interface Rules

src/main/java/org/apache/commons/digester3/Rules.java:31–103  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

29 * parsing.
30 */
31public interface Rules
32{
33
34 // ------------------------------------------------------------- Properties
35
36 /**
37 * Return the Digester instance with which this Rules instance is associated.
38 *
39 * @return the Digester instance with which this Rules instance is associated
40 */
41 Digester getDigester();
42
43 /**
44 * Set the Digester instance with which this Rules instance is associated.
45 *
46 * @param digester The newly associated Digester instance
47 */
48 void setDigester( Digester digester );
49
50 /**
51 * Return the namespace URI that will be applied to all subsequently added <code>Rule</code> objects.
52 *
53 * @return the namespace URI that will be applied to all subsequently added <code>Rule</code> objects.
54 */
55 String getNamespaceURI();
56
57 /**
58 * Set the namespace URI that will be applied to all subsequently added <code>Rule</code> objects.
59 *
60 * @param namespaceURI Namespace URI that must match on all subsequently added rules, or <code>null</code> for
61 * matching regardless of the current namespace URI
62 */
63 void setNamespaceURI( String namespaceURI );
64
65 // --------------------------------------------------------- Public Methods
66
67 /**
68 * Register a new Rule instance matching the specified pattern.
69 *
70 * @param pattern Nesting pattern to be matched for this Rule
71 * @param rule Rule instance to be registered
72 */
73 void add( String pattern, Rule rule );
74
75 /**
76 * Clear all existing Rule instance registrations.
77 */
78 void clear();
79
80 /**
81 * Return a List of all registered Rule instances that match the specified nesting pattern, or a zero-length List if
82 * there are no matches. If more than one Rule instance matches, they <strong>must</strong> be returned in the order
83 * originally registered through the <code>add()</code> method.
84 *
85 * @param namespaceURI Namespace URI for which to select matching rules, or <code>null</code> to match regardless of
86 * namespace URI
87 * @param pattern Nesting pattern to be matched
88 * @param name the local name if the parser is namespace aware, or just the element name otherwise

Callers 63

testAddRuleMethod · 0.65
beginMethod · 0.65
bodyMethod · 0.65
beginMethod · 0.65
getChildMethod · 0.65
getParentMethod · 0.65
NodeBuilderMethod · 0.65
endElementMethod · 0.65
getRulesMethod · 0.65
setRulesMethod · 0.65
addRuleMethod · 0.65
addFactoryCreateMethod · 0.65

Implementers 4

AnyChildRulessrc/main/java/org/apache/commons/diges
WithDefaultsRulesWrappersrc/main/java/org/apache/commons/diges
PluginRulessrc/main/java/org/apache/commons/diges
AbstractRulesImplsrc/main/java/org/apache/commons/diges

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…