public class Mode
extends java.lang.Object
| Constructor | Description |
|---|---|
Mode() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addRule(Pattern p,
java.lang.Object obj,
int precedence,
double priority) |
Add a rule to the Mode.
|
int |
getList(int fingerprint,
int type) |
Determine which list to use for a given pattern (we must also search the generic list)
|
int |
getNameCode() |
Get the name of this mode (for tracing output)
|
java.lang.Object |
getRule(NodeInfo node,
int min,
int max,
Context context) |
Get the rule corresponding to a given Node, by finding the best Pattern match, subject to a minimum
and maximum precedence.
|
java.lang.Object |
getRule(NodeInfo node,
Context context) |
Get the rule corresponding to a given Node, by finding the best Pattern match.
|
void |
setNameCode(int nameCode) |
Set the name of this mode (for tracing output)
|
public void setNameCode(int nameCode)
public int getNameCode()
public void addRule(Pattern p, java.lang.Object obj, int precedence, double priority)
p - a Patternobj - the Object to return from getRule() when the supplied element matches this Patternpublic int getList(int fingerprint,
int type)
public java.lang.Object getRule(NodeInfo node, Context context) throws javax.xml.transform.TransformerException
node - the NodeInfo referring to the node to be matchedjavax.xml.transform.TransformerExceptionpublic java.lang.Object getRule(NodeInfo node, int min, int max, Context context) throws XPathException
node - the NodeInfo referring to the node to be matchedXPathException