Node:Anonymous classes, Next:Module classes, Previous:Defining new classes, Up:Objects Classes and Modules
object (supers ...) field-or-method-decl ... | Syntax |
Returns a new instance of an anonymous (inner) class.
The syntax is similar to define-class .
field-or-method = field-decl | method-decl field-decl = (fname [[[::] ftype] finit]) | (fname [:: ftype] [option-keyword option-value]*) method-decl = ((method-name formal-arguments) [[::] rtype] body) Returns a new instance of a unique (anonymous) class. The class inherits from the list of supers, where at most one of the elements should be the base class being extended from, and the rest are interfaces. This is roughly equivalent to:
(begin (define-name hname (supers ...) field-or-method-decl ...) (make hname)) A field-decl is as for A method-decl is as for |