/** * Build a new <code>ArgumentCaptor</code>. * <p> * Note that an <code>ArgumentCaptor</code> <b>*doesn't do any type checks*</b>. It is only there to avoid casting * in your code. This might however change (type checks could be added) in a * future major release. * * @param clazz Type matching the parameter to be captured. * @param <S> Type of clazz * @param <U> Type of object captured by the newly built ArgumentCaptor * @return A new ArgumentCaptor */ public static <U,S extends U> ArgumentCaptor<U> forClass(Class<S> clazz) { return new ArgumentCaptor<U>(clazz); } }
/** * Build a new <code>ArgumentCaptor</code>. * <p> * Note that an <code>ArgumentCaptor</code> <b>*don't do any type checks*</b>, it is only there to avoid casting * in your code. This might however change (type checks could be added) in a * future major release. * * @param clazz Type matching the parameter to be captured. * @param <T> Type of clazz * @return A new ArgumentCaptor */ public static <T> ArgumentCaptor<T> forClass(Class<T> clazz) { return new ArgumentCaptor<T>(clazz); } }
public static <T> ArgumentCaptor<T> forClass(Class<T> clazz) { return new ArgumentCaptor<T>(clazz); } }