Files
wren/doc/site/modules/core/class.markdown
T

30 lines
500 B
Markdown
Raw Normal View History

2015-01-18 15:36:36 -08:00
^title Class Class
**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.
:::wren
2015-03-14 09:48:45 -07:00
class Crustacean {}
class Crab is Crustacean {}
System.print(Crab.supertype) //> Crustacean
2015-03-14 09:48:45 -07:00
A class with no explicit superclass implicitly inherits Object:
:::wren
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:
:::wren
System.print(Object.supertype) //> null