public List < String > attrNames ( ) { String [ ] names = this . _getAttrNames ( ) ; if ( null != names && names . length != 0 ) { return Arrays . asList ( names ) ; } Method [ ] methods = this . _getUsefulClass ( ) . getMethods ( ) ; String methodName ; List < String > attrs = new ArrayList < String > ( ) ; for ( Method method : methods ) { methodName = method . getName ( ) ; if ( methodName . startsWith ( "set" ) ) { String attr = methodName . substring ( 3 ) . toLowerCase ( ) ; if ( StrKit . notBlank ( attr ) ) { attrs . add ( attr ) ; } } } return attrs ; }
Get attr names