eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'InlineObjectClassDescription':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: InlineObjectClassDescription


Inheritance:

   Object
   |
   +--Behavior
      |
      +--ClassDescription
         |
         +--InlineObjectClassDescription

Package:
stx:libbasic
Category:
Kernel-Classes
Version:
rev: 1.7 date: 2018/05/09 09:42:08
user: cg
file: InlineObjectClassDescription.st directory: libbasic
module: stx stc-classLibrary: libbasic

Description:


inline objects are an experimental feature in ST/X
(and currently not used by the system).
The are created by the parsers/compilers with the following
syntax:
    #{
        <slotName>: value .
        ...
    }
i.e. similar to the brace-array construct { expr1 . ... }
For every inline object, an anonymous class is created,
providing getters and setters for the slots.
(if literal objects are immutable (which is the default), 
 no setters are generated)

You cannot add any semantic (i.e. methods) to inline objects -
they are only useful as containers with a nicer protocol
as compared to dictionaries or arrays.

All such created classes will be subclasses of me.

[example:]
    |foo|

    foo := #{ foo: 'foo value' .
             bar: 'bar value' .
             baz: 'and obviously: a baz value' }.
    foo bar.
    foo baz.
    foo inspect.


Instance protocol:

queries
o  name
although inline objects have no name, we return something
useful here - there are many places (inspectors) where
a classes name is asked for.

o  nameSpace
(comment from inherited method)
should be redefined in concrete subclass(es)

o  package
return libbasic, so the methods of my subclass-instances (i.e. the inline objects)
are not seen as extensions in the browser)



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Tue, 20 Nov 2018 16:23:35 GMT