Class XPathMatcher


  • public class XPathMatcher
    extends java.lang.Object
    Supports a limited set of XPath expressions, specifically those documented on this page.

    Used for checking whether a visitor's cursor meets a certain XPath expression.

    The "current node" for XPath evaluation is always the root node of the document. As a result, '.' and '..' are not recognized.

    • Constructor Summary

      Constructors 
      Constructor Description
      XPathMatcher​(java.lang.String expression)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean matches​(org.openrewrite.Cursor cursor)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XPathMatcher

        public XPathMatcher​(java.lang.String expression)
    • Method Detail

      • matches

        public boolean matches​(org.openrewrite.Cursor cursor)