Class PatternMatchingNodeFilter

  • All Implemented Interfaces:
    NodeFilter, java.util.function.Predicate<Node>

    public class PatternMatchingNodeFilter
    extends java.lang.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.
    • Field Summary

      • Fields inherited from interface de.obqo.decycle.model.NodeFilter

        ALL
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean test​(Node node)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Predicate

        and, negate, or
    • Constructor Detail

      • PatternMatchingNodeFilter

        public PatternMatchingNodeFilter​(java.lang.String pattern)
    • Method Detail

      • test

        public boolean test​(Node node)
        Specified by:
        test in interface java.util.function.Predicate<Node>