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