public static Method getGetterPropertyMethod ( Class < ? > type , String propertyName ) { String sourceMethodName = "get" + BeanUtils . capitalizePropertyName ( propertyName ) ; Method sourceMethod = BeanUtils . getMethod ( type , sourceMethodName ) ; if ( sourceMethod == null ) { sourceMethodName = "is" + BeanUtils . capitalizePropertyName ( propertyName ) ; sourceMethod = BeanUtils . getMethod ( type , sourceMethodName ) ; if ( sourceMethod != null && sourceMethod . getReturnType ( ) != Boolean . TYPE ) { sourceMethod = null ; } } return sourceMethod ; }
get the getter method corresponding to given property