recursively walk up the inheritance tree to find methods