Note: information on this page refers to Ceylon 1.0, not to the current release.
When a class which is annotated
two functions which will be called when creating new instances of that class: one
before the class body is executed and one after that. Both functions are optional.
The names of these functions are
TYPE_NAME is the generated name for the type
- The instance being initialized,
- and the type arguments, if the type has type parameters.
As a matter of fact, we use this facility of the compiler when compiling one of our
own classes, the
Exception class. The class is annotated
native and the
hook is used to add the stack trace to new exceptions.