|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Rules
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. The interface has been inspired by the rulesBase equivalent.
Method Summary | |
---|---|
void |
add(int[] pattern,
Rule rule)
Register a new Rule instance matching the specified pattern. |
void |
clear()
Clear all existing Rule instance registrations. |
BERDigester |
getDigester()
Get the BERDigester instance with which this Rules
instance is associated. |
java.util.List |
match(int[] 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. |
java.util.List |
match(org.apache.commons.collections.primitives.IntStack 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. |
java.util.List |
rules()
Return a List of all registered Rule instances, or a zero-length List if there are no registered Rule instances. |
void |
setDigester(BERDigester digester)
Get the BERDigester instance with which this Rules
instance is associated. |
Method Detail |
---|
BERDigester getDigester()
BERDigester
instance with which this Rules
instance is associated.
void setDigester(BERDigester digester)
BERDigester
instance with which this Rules
instance is associated.
digester
- the new BERDigester to be associated with this Rules
instancevoid add(int[] pattern, Rule rule)
pattern
- Tag nesting pattern to be matched for this Rulerule
- Rule instance to be registeredvoid clear()
java.util.List match(int[] pattern)
add()
method.
pattern
- Nesting pattern to be matchedjava.util.List match(org.apache.commons.collections.primitives.IntStack pattern)
add()
method. The IntStack argument should not be affected by the match call.
pattern
- Nesting pattern to be matchedjava.util.List rules()
add()
method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |