Class XPathAttributeMatcher
- java.lang.Object
-
- org.eclipse.lemminx.xpath.matcher.AbstractXPathNodeMatcher
-
- org.eclipse.lemminx.xpath.matcher.XPathAttributeMatcher
-
- All Implemented Interfaces:
IXPathNodeMatcher
public class XPathAttributeMatcher extends AbstractXPathNodeMatcher
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.lemminx.xpath.matcher.IXPathNodeMatcher
IXPathNodeMatcher.MatcherType
-
-
Field Summary
-
Fields inherited from interface org.eclipse.lemminx.xpath.matcher.IXPathNodeMatcher
EMPTY_NODE_MATCHER
-
-
Constructor Summary
Constructors Constructor Description XPathAttributeMatcher(String attrName, String attrValue, XPathMatcher matcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAttrName()Returns the attribute name to match.StringgetAttrValue()Returns the attribute value to match.intgetIndexWildcard()Returns the wildcard index and -1 if no wildcard is defined.IXPathNodeMatcher.MatcherTypegetType()Returns matcher type.booleanhasWildcard()Returns true if attrValue is wilcard or false otherwise.booleanisAny()Returns true if matcher is any (Node is every time matched) and false otherwise.booleanmatch(Node testNode, Collection<String> wildcardValues)Match theNodeand fill wildcard values if node matcher define widcard.-
Methods inherited from class org.eclipse.lemminx.xpath.matcher.AbstractXPathNodeMatcher
getOwnerMatcher
-
-
-
-
Constructor Detail
-
XPathAttributeMatcher
public XPathAttributeMatcher(String attrName, String attrValue, XPathMatcher matcher)
-
-
Method Detail
-
getType
public IXPathNodeMatcher.MatcherType getType()
Description copied from interface:IXPathNodeMatcherReturns matcher type.- Returns:
-
match
public boolean match(Node testNode, Collection<String> wildcardValues)
Description copied from interface:IXPathNodeMatcherMatch theNodeand fill wildcard values if node matcher define widcard.- Parameters:
testNode- node to test.wildcardValues- wildcard values if node matcher define widcard.- Returns:
-
getAttrName
public String getAttrName()
Returns the attribute name to match.- Returns:
-
getAttrValue
public String getAttrValue()
Returns the attribute value to match.- Returns:
-
hasWildcard
public boolean hasWildcard()
Returns true if attrValue is wilcard or false otherwise.- Returns:
-
getIndexWildcard
public int getIndexWildcard()
Returns the wildcard index and -1 if no wildcard is defined.- Returns:
-
isAny
public boolean isAny()
Description copied from interface:IXPathNodeMatcherReturns true if matcher is any (Node is every time matched) and false otherwise.- Returns:
-
-