2015-01-18 15:36:36 -08:00
|
|
|
^title Class Class
|
2015-11-08 13:31:22 -08:00
|
|
|
|
|
|
|
|
**TODO**
|
2015-01-18 15:36:36 -08:00
|
|
|
|
2015-03-27 07:43:36 -07:00
|
|
|
## Methods
|
|
|
|
|
|
2015-01-18 15:36:36 -08:00
|
|
|
### **name**
|
|
|
|
|
|
|
|
|
|
The name of the class.
|
2015-03-14 09:48:45 -07:00
|
|
|
|
|
|
|
|
### **supertype**
|
|
|
|
|
|
|
|
|
|
The superclass of this class.
|
|
|
|
|
|
2015-09-22 07:59:54 -07:00
|
|
|
:::wren
|
2015-03-14 09:48:45 -07:00
|
|
|
class Crustacean {}
|
|
|
|
|
class Crab is Crustacean {}
|
|
|
|
|
|
2015-10-18 15:56:52 -07:00
|
|
|
System.print(Crab.supertype) //> Crustacean
|
2015-03-14 09:48:45 -07:00
|
|
|
|
|
|
|
|
A class with no explicit superclass implicitly inherits Object:
|
|
|
|
|
|
2015-09-22 07:59:54 -07:00
|
|
|
:::wren
|
2015-10-18 15:56:52 -07:00
|
|
|
System.print(Crustacean.supertype) //> Object
|
2015-03-14 09:48:45 -07:00
|
|
|
|
|
|
|
|
Object forms the root of the class hierarchy and has no supertype:
|
|
|
|
|
|
2015-09-22 07:59:54 -07:00
|
|
|
:::wren
|
2015-10-18 15:56:52 -07:00
|
|
|
System.print(Object.supertype) //> null
|