Class ClassNamePatternFilterUtils


  • @API(status=INTERNAL,
         since="1.7")
    public class ClassNamePatternFilterUtils
    extends java.lang.Object
    Collection of utilities for creating filters based on class names.

    DISCLAIMER

    These utilities are intended solely for usage within the JUnit framework itself. Any usage by external parties is not supported. Use at your own risk!

    Since:
    1.7
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ALL_PATTERN  
      static java.lang.String BLANK  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.function.Predicate<T> excludeMatchingClasses​(java.lang.String patterns)
      Create a Predicate that can be used to exclude (i.e., filter out) objects of type T whose fully qualified class names match any of the supplied patterns.
      static java.util.function.Predicate<java.lang.String> excludeMatchingClassNames​(java.lang.String patterns)
      Create a Predicate that can be used to exclude (i.e., filter out) fully qualified class names matching any of the supplied patterns.
      static <T> java.util.function.Predicate<T> includeMatchingClasses​(java.lang.String patterns)
      Create a Predicate that can be used to include (i.e., filter in) objects of type T whose fully qualified class names match any of the supplied patterns.
      static java.util.function.Predicate<java.lang.String> includeMatchingClassNames​(java.lang.String patterns)
      Create a Predicate that can be used to include (i.e., filter in) fully qualified class names matching any of the supplied patterns.
      • Methods inherited from class java.lang.Object

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

      • excludeMatchingClasses

        public static <T> java.util.function.Predicate<T> excludeMatchingClasses​(java.lang.String patterns)
        Create a Predicate that can be used to exclude (i.e., filter out) objects of type T whose fully qualified class names match any of the supplied patterns.
        Parameters:
        patterns - a comma-separated list of patterns
      • excludeMatchingClassNames

        public static java.util.function.Predicate<java.lang.String> excludeMatchingClassNames​(java.lang.String patterns)
        Create a Predicate that can be used to exclude (i.e., filter out) fully qualified class names matching any of the supplied patterns.
        Parameters:
        patterns - a comma-separated list of patterns
      • includeMatchingClasses

        public static <T> java.util.function.Predicate<T> includeMatchingClasses​(java.lang.String patterns)
        Create a Predicate that can be used to include (i.e., filter in) objects of type T whose fully qualified class names match any of the supplied patterns.
        Parameters:
        patterns - a comma-separated list of patterns
      • includeMatchingClassNames

        public static java.util.function.Predicate<java.lang.String> includeMatchingClassNames​(java.lang.String patterns)
        Create a Predicate that can be used to include (i.e., filter in) fully qualified class names matching any of the supplied patterns.
        Parameters:
        patterns - a comma-separated list of patterns