Libraries like django have their own method detection routines; it would be great to copy one of them and use it.