public static boolean hasConstructorInTheCorrectForm ( Class < ? > clazz ) { if ( clazz . getConstructors ( ) . length != 1 ) { return false ; } Constructor < ? > con = clazz . getConstructors ( ) [ 0 ] ; if ( con . getParameterTypes ( ) . length == 0 ) { return false ; } Annotation [ ] [ ] parameterAnnotations = con . getParameterAnnotations ( ) ; for ( Annotation [ ] as : parameterAnnotations ) { if ( ! hasColumnAnnotation ( as ) ) { return false ; } } return true ; }
Check if the given class has the correct form .