1 package org.junit.runner; 2 3 import org.junit.runner.manipulation.Filter; 4 5 /** 6 * Extend this class to create a factory that creates {@link Filter}. 7 */ 8 public interface FilterFactory { 9 /** 10 * Creates a {@link Filter} given a {@link FilterFactoryParams} argument. 11 * 12 * @param params Parameters needed to create the {@link Filter} 13 */ 14 Filter createFilter(FilterFactoryParams params) throws FilterNotCreatedException; 15 16 /** 17 * Exception thrown if the {@link Filter} cannot be created. 18 */ 19 public static class FilterNotCreatedException extends Exception { 20 public FilterNotCreatedException(Exception exception) { 21 super(exception.getMessage(), exception); 22 } 23 } 24 } 25