Implementing a visitor to look all methods declarations.