A type hierarchy provides navigations between a type and its resolved supertypes and subtypes for a specific type or for all types within a region. Supertypes may extend outside of the type hierarchy's region in which it was created such that the root of the hierarchy is always included. For example, if a type hierarchy is created for a
java.io.File
, and the region the hierarchy was created in is the package fragment
java.io
, the supertype
java.lang.Object
will still be included. As a historical quirk,
java.lang.Object
has always been included in type hierarchies created on interface types.
A type hierarchy is static and can become stale. Although consistent when created, it does not automatically track changes in the model. As changes in the model potentially invalidate the hierarchy, change notifications are sent to registered ITypeHierarchyChangedListener
s. Listeners should use the exists
method to determine if the hierarchy has become completely invalid (for example, when the type or project the hierarchy was created on has been removed). To refresh a hierarchy, use the refresh
method.
The type hierarchy may contain cycles due to malformed supertype declarations. Most type hierarchy queries are oblivious to cycles; the getAll*
methods are implemented such that they are unaffected by cycles.
@noimplement This interface is not intended to be implemented by clients.