1 package junitparams.custom; 2 3 import java.lang.annotation.Annotation; 4 5 /** 6 * An interface for custom parameters providers. To be used with {@link CustomParameters} annotation. 7 * Must have a default no-args constructor. 8 * 9 * @param <A> type of annotation mentioning this provider 10 */ 11 public interface ParametersProvider<A extends Annotation> { 12 13 /** 14 * Initializes this provider - you can read your custom annotation config here. 15 * 16 * @param parametersAnnotation parameters annotation on test method 17 */ initialize(A parametersAnnotation)18 void initialize(A parametersAnnotation); 19 20 /** 21 * Actual parameters generation 22 * 23 * @return parameters for test method calls 24 */ getParameters()25 Object[] getParameters(); 26 } 27