AnyChildNodePattern
, AnyNodeTest
, NamespaceTest
, NameTest
, NodeTypeTest
, NoNodeTest
public abstract class NodeTest extends Pattern
originalText, staticContext
Constructor | Description |
---|---|
NodeTest() |
Modifier and Type | Method | Description |
---|---|---|
abstract boolean |
matches(short nodeType,
int fingerprint) |
Test whether this node test is satisfied by a given node
|
abstract boolean |
matches(NodeInfo node) |
Test whether this node test is satisfied by a given node
|
boolean |
matches(NodeInfo node,
Context c) |
Test whether this node test is satisfied by a given node, in a given Context
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDefaultPriority, getFingerprint, getLineNumber, getNodeType, getStaticContext, getSystemId, make, setOriginalText, setStaticContext, simplify, toString
public abstract boolean matches(NodeInfo node)
public abstract boolean matches(short nodeType, int fingerprint)
nodeType
- The type of node to be matchedfingerprint
- identifies the expanded name of the node to be matched.
The value should be -1 for a node with no name.public final boolean matches(NodeInfo node, Context c)
matches
in class Pattern
node
- The NodeInfo representing the Element or other node to be tested against the Patternc
- The context in which the match is to take place. Only relevant if the pattern
uses variables.