semantic: Add function for getting class method types.