Lines Matching refs:name
40 * to find a public method with specified name and parameter types
55 * @param name the name of method to find
61 public static Method findMethod(Class<?> type, String name, Class<?>...args) throws NoSuchMethodException {
62 if (name == null) {
63 throw new IllegalArgumentException("Method name is not set");
66 Signature signature = new Signature(type, name, args);
73 method = findAccessibleMethod(new MethodFinder(name, args).find(type.getMethods()));
85 * @param name the name of method to find
91 public static Method findInstanceMethod(Class<?> type, String name, Class<?>... args) throws NoSuchMethodException {
92 Method method = findMethod(type, name, args);
94 throw new NoSuchMethodException("Method '" + name + "' is static");
104 * @param name the name of method to find
110 public static Method findStaticMethod(Class<?> type, String name, Class<?>...args) throws NoSuchMethodException {
111 Method method = findMethod(type, name, args);
113 throw new NoSuchMethodException("Method '" + name + "' is not static");
155 String name = method.getName();
159 return findAccessibleMethod(type.getMethod(name, params));
165 if (m.getName().equals(name)) {
181 throw new NoSuchMethodException("Method '" + name + "' is not accessible");
185 private final String name;
190 * @param name the name of method to find
193 private MethodFinder(String name, Class<?>[] args) {
195 this.name = name;
228 * should have the specified name.
236 return super.isValid(method) && method.getName().equals(this.name);