/** * Matches a {@link MethodDescription} by applying an iterable collection of element matcher on any parameter's {@link TypeDescription.Generic}. * * @param matchers The matcher that are applied onto the parameter types of the matched method description. * @param <T> The type of the matched object. * @return A matcher that matches a method description by applying another element matcher onto each parameter's type. */ public static <T extends MethodDescription> ElementMatcher.Junction<T> takesGenericArguments(ElementMatcher<? super Iterable<? extends TypeDescription.Generic>> matchers) { return new MethodParametersMatcher<T>(new MethodParameterTypesMatcher<ParameterList<?>>(matchers)); }
/** * Matches a {@link MethodDescription} by applying an iterable collection of element matcher on any parameter's {@link TypeDescription}. * * @param matchers The matcher that are applied onto the parameter types of the matched method description. * @param <T> The type of the matched object. * @return A matcher that matches a method description by applying another element matcher onto each parameter's type. */ public static <T extends MethodDescription> ElementMatcher.Junction<T> takesArguments(ElementMatcher<? super Iterable<? extends TypeDescription>> matchers) { return new MethodParametersMatcher<T>(new MethodParameterTypesMatcher<ParameterList<?>>(erasures(matchers))); }