mirror of https://github.com/apache/cloudstack.git
ReflectUtil: findMethod removed
findMethod was not used, it is removed Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
This commit is contained in:
parent
0d7aa931b4
commit
66fe3abe3b
|
|
@ -26,7 +26,6 @@ import java.beans.PropertyDescriptor;
|
|||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
|
|
@ -58,19 +57,6 @@ public class ReflectUtil {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Method findMethod(Class<?> clazz, String methodName) {
|
||||
do {
|
||||
Method[] methods = clazz.getDeclaredMethods();
|
||||
for (Method method : methods) {
|
||||
if (methodName.equals(method.getName())) {
|
||||
return method;
|
||||
}
|
||||
}
|
||||
clazz = clazz.getSuperclass();
|
||||
} while (clazz != null);
|
||||
return null;
|
||||
}
|
||||
|
||||
// Gets all classes with some annotation from a package
|
||||
public static Set<Class<?>> getClassesWithAnnotation(Class<? extends Annotation> annotation,
|
||||
|
|
|
|||
Loading…
Reference in New Issue