Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Define "Indirect subclass" in Android

Tags:

android

class

Looking at various pages in the Android docs, some of them list "Known Indirect Subclasses". What does this mean?

like image 687
Casebash Avatar asked Apr 27 '10 04:04

Casebash


People also ask

What is an indirect subclass?

An indirect superclass of a subclass is two or more levels up the class hierarchy from that subclass. In single inheritance, a class is derived from one direct superclass. In multiple inheritance, a class is derived from more than one direct superclass.


1 Answers

For an interface, it's a list of classes that implement the interface.

For a class, it's a list of classes that derive from the class, but indirectly (ie., the class in the list is derived from some class that itself derives from the class being documented directly or indirectly).

So the android.view.ViewGroup derives directly from android.view.View and indirectly from java.lang.Object:

java.lang.Object
    android.view.View
        android.view.ViewGroup

Since interfaces can only be implemented, not directly derived from, a class that implements an interface is always considered to be 'indirectly derived' from the interface.

like image 83
Michael Burr Avatar answered Sep 20 '22 12:09

Michael Burr