public final class MethodFinderUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
allParametersOfSameType(Class<?>[] params) |
protected static boolean |
doesNotMatchScope(MethodScope methodScope,
Method method) |
static Method |
findMethod(Class<?> type,
MethodScope methodScope,
String name,
Class<?> returnType) |
static Method |
findMethod(Class<?> type,
MethodScope methodScope,
String name,
Class<?> returnType,
Class<?>[] paramTypes)
Returns a specific public methods that: have the specified prefix; have
the specified return type (or some subtype), and has the
specified number of parameters.
|
static List<Method> |
findMethodsWithAnnotation(Class<?> type,
MethodScope methodScope,
Class<? extends Annotation> annotationClass) |
static Method |
findMethodWithOrWithoutParameters(Class<?> type,
MethodScope classMethod,
String name,
Class<?> returnType,
Class<?>[] paramTypes) |
static Class<?>[] |
paramTypesOrNull(Class<?> type) |
static void |
removeMethod(MethodRemover methodRemover,
Method method) |
public static Method findMethodWithOrWithoutParameters(Class<?> type, MethodScope classMethod, String name, Class<?> returnType, Class<?>[] paramTypes)
public static Method findMethod(Class<?> type, MethodScope methodScope, String name, Class<?> returnType, Class<?>[] paramTypes)
If the returnType is specified as null then the return type is ignored. If void.class is passed in, then searches for void methods.
If the parameter type array is null, is also not checked.
protected static boolean doesNotMatchScope(MethodScope methodScope, Method method)
public static Method findMethod(Class<?> type, MethodScope methodScope, String name, Class<?> returnType)
public static List<Method> findMethodsWithAnnotation(Class<?> type, MethodScope methodScope, Class<? extends Annotation> annotationClass)
public static void removeMethod(MethodRemover methodRemover, Method method)
public static Class<?>[] paramTypesOrNull(Class<?> type)
public static boolean allParametersOfSameType(Class<?>[] params)
Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.