Class PatternMatchingNodeFilter

  • All Implemented Interfaces:
    NodeFilter, Predicate<Node>

    public class PatternMatchingNodeFilter
    extends Object
    implements NodeFilter
    NodeFilter that filters a Node based on its name.

    A Node passes this filter it its name matches a given ant-like pattern.

    • * matches a single (simple) class name or one part of package name (i.e. everything that is not a dot '.').
      For example java.util.* will match all class names in the java.util package, but not in any subpackages (like java.util.regex). java.util.*.* will match all class names in all subpackages of java.util, but not the classes in java.util
    • ** matches any string including dots.
      For example java.util.** will match all class names in the java.util package and its subpackages.
    • The pattern may contain parentheses and the pipe symbol '|' to create more complex patterns.
    • Constructor Detail

      • PatternMatchingNodeFilter

        public PatternMatchingNodeFilter​(String pattern)