Add method to get a method location.