rfc:static-classes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:static-classes [2008/05/05 20:55] – Better use case examples lstrojny | rfc:static-classes [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 41: | Line 41: | ||
</ | </ | ||
- | ===== Object | + | |
+ | |||
+ | |||
+ | ===== Class model rules ===== | ||
The following rules would apply for static classes: | The following rules would apply for static classes: | ||
Line 47: | Line 50: | ||
* Static methods in abstract static classes **may not** be called. They must be extended first | * Static methods in abstract static classes **may not** be called. They must be extended first | ||
* In static classes, abstract static methods **are allowed** again | * In static classes, abstract static methods **are allowed** again | ||
- | * Static classes **may not** have a constructor, | + | * Static classes **may not** have a constructor, |
* Static classes **may not** extend non-static classes | * Static classes **may not** extend non-static classes | ||
* The current behaviour of abstract classes/ | * The current behaviour of abstract classes/ | ||
- | + | * '' | |
- | + | * Static classes **cannot** be instantiated | |
+ | * Static classes **can** implement interfaces containing only static methods | ||
===== Code ===== | ===== Code ===== |
rfc/static-classes.1210020930.txt.gz · Last modified: 2017/09/22 13:28 (external edit)