Note: information on this page refers to Ceylon 1.0, not to the current release.
formal annotation
The formal annotation marks a member as not having a concrete implementation;
one must be provided by subtypes.
Usage
class abstract Example() {
shared formal void method() {
}
}
Description
Methods, attributes, and member classes may be annotated formal.
Because a member that is refinable must be visible outside the
scope of the type it's defined in, a default member is necessarily
shared.
Only abstract classes and interfaces are permitted to have formal members.
formal is the Ceylon equivalent of Java's abstract modifier on methods.
See also
- API documentation for
formal - Reference for annotations in general