public static List < Method > getBeanSetters ( Class < ? > clazz ) { List < Method > methods = CollectUtils . newArrayList ( ) ; for ( Method m : clazz . getMethods ( ) ) { if ( m . getName ( ) . startsWith ( "set" ) && m . getName ( ) . length ( ) > 3 ) { if ( Modifier . isPublic ( m . getModifiers ( ) ) && ! Modifier . isStatic ( m . getModifiers ( ) ) && m . getParameterTypes ( ) . length == 1 ) { methods . add ( m ) ; } } } return methods ; }
Return list of setters