提交 e71ff290 编写于 作者: J Juergen Hoeller

Polishing

上级 d9c1811d
......@@ -277,17 +277,18 @@ public class ResolvableMethod {
* Filter on methods with the given name.
*/
public Builder<T> named(String methodName) {
addFilter("methodName=" + methodName, m -> m.getName().equals(methodName));
addFilter("methodName=" + methodName, method -> method.getName().equals(methodName));
return this;
}
/**
* Filter on methods with the given parameter types.
* @since 5.1
*/
public Builder<T> argTypes(Class<?>... argTypes) {
addFilter("argTypes=" + Arrays.toString(argTypes), m ->
ObjectUtils.isEmpty(argTypes) ?
m.getParameterTypes().length == 0 : Arrays.equals(m.getParameterTypes(), argTypes));
addFilter("argTypes=" + Arrays.toString(argTypes), method ->
ObjectUtils.isEmpty(argTypes) ? method.getParameterCount() == 0 :
Arrays.equals(method.getParameterTypes(), argTypes));
return this;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册