src/main/java/com/rockagen/commons/util/ClassUtil.java
public static Method[] getAnnotatedDeclaredMethods(Class<?> clazz,
			Class<? extends Annotation> annotationClass, boolean recursively) {
		Method[] allMethods = getDeclaredMethods(clazz, recursively);
		List<Method> annotatedMethods = new LinkedList<Method>();

		for (Method method : allMethods) {
			if (method.isAnnotationPresent(annotationClass))
				annotatedMethods.add(method);
		}

		return annotatedMethods.toArray(new Method[annotatedMethods.size()]);
	}
public static Method[] getAnnotatedDeclaredMethods(Class<?> clazz,
			Class<? extends Annotation> annotationClass, boolean recursively) {
		Method[] allMethods = getDeclaredMethods(clazz, recursively);
		List<Method> annotatedMethods = new LinkedList<Method>();

		for (Method method : allMethods) {
			if (method.isAnnotationPresent(annotationClass))
				annotatedMethods.add(method);
		}

		return annotatedMethods.toArray(new Method[annotatedMethods.size()]);
	}
public static Method [ ] getAnnotatedDeclaredMethods ( Class < ? > clazz , Class < ? extends Annotation > annotationClass , boolean recursively ) { Method [ ] allMethods = getDeclaredMethods ( clazz , recursively ) ; List < Method > annotatedMethods = new LinkedList < Method > ( ) ; for ( Method method : allMethods ) { if ( method . isAnnotationPresent ( annotationClass ) ) annotatedMethods . add ( method ) ; } return annotatedMethods . toArray ( new Method [ annotatedMethods . size ( ) ] ) ; }
obtain methods list of specified class and which are annotated by
incoming annotation class If recursively is true, obtain methods from all
class hierarchy

@param clazz class
- where methods are searching
@param annotationClass
- specified annotation class
@param recursively
param
@return list of annotated methods
obtain methods list of specified class and which are annotated by incoming annotation class If recursively is true obtain methods from all class hierarchy