Search code examples
javaeclipseoverridingsuperclass

View method default behavior for overriding


I'm learning how to use @override and its pretty awesome, right now I'm trying to find out how to view the methods you override. The API (I'm still new, so I may be wrong here) will tell you the method names and describe them but doesn't actually show you the code.

I use Eclipse's context assist to find the methods I can override, and I know I can call super.'thismethod'() to perform the default action, but what if I want to change something or just see if I really need to?

Question: How do I view the full method code of a superclass, for overriding purposes?

Thanks for all the replies!


Solution

  • Select the method and press F3 key that will take you to the super class implementation (Important you should have the code of Superclass in your classpath not just the class file)