Java Reference
In-Depth Information
Figure 9.4
The Hierarchy tool window provides a view
into the different hierarchies a class
participates in, including its inheritance
tree, as shown here.
Unlike the Structure view, the Hierarchy window isn't updated auto-
matically as you move between files or change tabs in the editor. It's simi-
lar to the Find window, displaying a static set of results that are updated
only when you execute one of the hierarchy commands or click the Hi-
erarchy toolbar's refresh button.
WARNING
The Hierarchy window shows the class hierarchy all the way up to the Object class,
which is the root of all Java objects. The default view is one of three different views
of the type hierarchy that are available. You can change the view by clicking one of
the first three icons of the Hierarchy toolbar. Each view is mutually exclusive:
Class Hierarchy , the default view for classes, traces the lineage of the cur-
rent class back to the Object class, which forms the root of the results tree.
This view lets you see the chain of inheritance for the current class. This
mode isn't available when you're examining interfaces.
Supertypes Hierarchy shows the hierarchy of each supertype of the cur-
rent class. In this view, the current class forms the root of a list of all the
classes and interfaces from which it's descended. You can view each ances-
tral class's ancestors as well.
Subtypes Hierarchy shows all the classes than extend the selected class or
implement the selected interface.
Inspecting method hierarchies
The method hierarchy view is a feature related to viewing the class hierarchy. This
view lets you explore the inheritance chain of methods, just as you can do for
classes and interfaces. When you extend a class in Java, you can override the
methods of the parent class in order to provide new or altered behavior, or, in the
case of abstract methods, implement methods not provided fully by the base
 
 
 
 
Search WWH ::




Custom Search