Class PatternFilter

  • All Implemented Interfaces:
    StaticFilter

    public class PatternFilter
    extends Object
    implements StaticFilter
    Static filter keeping classes and methods whose names match a regex, tested with both full match and substring find.
    • Method Detail

      • classMatching

        public static PatternFilter classMatching​(String regex)
        Builds a filter matching on the owning class name.
        Parameters:
        regex - the pattern to compile
        Returns:
        a filter with no method constraint
        Throws:
        PatternSyntaxException - if the regex is malformed
      • methodMatching

        public static PatternFilter methodMatching​(String regex)
        Builds a filter matching on the method signature or bare method name.
        Parameters:
        regex - the pattern to compile
        Returns:
        a filter with no class constraint
        Throws:
        PatternSyntaxException - if the regex is malformed
      • clinitMethods

        public static PatternFilter clinitMethods()
        Builds a filter matching static initializers.
        Returns:
        a filter whose method pattern is ".*\\.<clinit>\\(\\)V"