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 formal 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