public class Pattern
extends java.lang.Object
| Constructor and Description |
|---|
Pattern()
Creates a new default pattern.
|
Pattern(java.lang.String pattern) |
| Modifier and Type | Method and Description |
|---|---|
LocationPathPattern |
getMatchingPattern(XPathNode node,
XPathContext context)
Returns the LocationPathPattern with the highest priority
that matches the given XPathNode using the given XPathContext.
|
boolean |
matches(XPathNode node,
XPathContext context)
Determines if the given node is matched by this Pattern with
respect to the given context.
|
java.lang.String |
toString()
Returns the String representation of this Pattern.
|
public Pattern()
public Pattern(java.lang.String pattern)
throws PatternException
PatternExceptionpublic LocationPathPattern getMatchingPattern(XPathNode node, XPathContext context) throws XPathException
node - the node to determine a match forcontext - the XPathContextXPathExceptionpublic boolean matches(XPathNode node, XPathContext context) throws XPathException
node - the node to determine a match forcontext - the XPathContextXPathException - when an error occurs during
evaluationpublic java.lang.String toString()
toString in class java.lang.Object