src/main/java/com/rockagen/commons/util/ClassUtil.java
public static Constructor<?>[] getAnnotatedDeclaredConstructors(
			Class<?> clazz, Class<? extends Annotation> annotationClass,
			boolean recursively) {
		Constructor<?>[] allConstructors = getDeclaredConstructors(clazz,
				recursively);
		List<Constructor<?>> annotatedConstructors = new LinkedList<Constructor<?>>();

		for (Constructor<?> field : allConstructors) {
			if (field.isAnnotationPresent(annotationClass))
				annotatedConstructors.add(field);
		}

		return annotatedConstructors
				.toArray(new Constructor<?>[annotatedConstructors.size()]);
	}
public static Constructor<?>[] getAnnotatedDeclaredConstructors(
			Class<?> clazz, Class<? extends Annotation> annotationClass,
			boolean recursively) {
		Constructor<?>[] allConstructors = getDeclaredConstructors(clazz,
				recursively);
		List<Constructor<?>> annotatedConstructors = new LinkedList<Constructor<?>>();

		for (Constructor<?> field : allConstructors) {
			if (field.isAnnotationPresent(annotationClass))
				annotatedConstructors.add(field);
		}

		return annotatedConstructors
				.toArray(new Constructor<?>[annotatedConstructors.size()]);
	}
public static Constructor < ? > [ ] getAnnotatedDeclaredConstructors ( Class < ? > clazz , Class < ? extends Annotation > annotationClass , boolean recursively ) { Constructor < ? > [ ] allConstructors = getDeclaredConstructors ( clazz , recursively ) ; List < Constructor < ? > > annotatedConstructors = new LinkedList < Constructor < ? > > ( ) ; for ( Constructor < ? > field : allConstructors ) { if ( field . isAnnotationPresent ( annotationClass ) ) annotatedConstructors . add ( field ) ; } return annotatedConstructors . toArray ( new Constructor < ? > [ annotatedConstructors . size ( ) ] ) ; }
obtain constructors list of specified class and which are annotated by
incoming annotation class If recursively is true, obtain constructors
from all class hierarchy

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