protected boolean isAccessor ( Method m ) { Class returnType = m . getReturnType ( ) ; // JBAS-4473, look for get<name>() String name = m . getName ( ) ; if ( ! ( name . startsWith ( "get" ) && name . length ( ) > "get" . length ( ) ) ) if ( ! ( name . startsWith ( "is" ) && name . length ( ) > "is" . length ( ) ) || ! ( returnType == Boolean . TYPE ) ) return false ; if ( returnType == Void . TYPE ) return false ; if ( m . getParameterTypes ( ) . length != 0 ) return false ; return hasNonAppExceptions ( m ) ; }
Check if a method is an accessor .