eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Autoload':

Home

everywhere
www.exept.de
for:
[back]

Class: Autoload


Inheritance:

   nil
   |
   +--Autoload

  This class inherits NOTHING - most messages will lead into doesNotUnderstand:

Package:
stx:libbasic
Category:
Kernel-Classes
Version:
rev: 1.157 date: 2010/03/13 11:36:57
user: cg
file: Autoload.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Claus Gittinger

Description:


In memory limited systems (as my 8Mb 386 is) all seldom-used classes are made
subclasses of this class. 
Autoload catches all messages and files-In the corresponding code
when first used. 
Then the caught message is resent to the (now existing) class.

Class files are searched along the searchPath (see Smalltalk),
and any of binary-classFile, byteCode-classFile or sourceFile are
loaded, whichever is found first. For binaries to be loaded,
these must be found in the 'bin' directory. Sources must be found
in the 'source' directory.
(Usually, Autoload classes finds the source file and loads that one).

When started, the patches startup script arranges for the abbreviation
file 'include/abbrev.stc' to be read and installs autoload stubs for
all classes listed in that file, which do not exist already.
The abbreviation file is maintained by the production environment
and updated by makefile rules - therefore, it should not be edited
manually.

Late addition: above comment is no longer true - I have made now almost
all Demos & Goodies be autoloaded ... even for big systems.

[class variables:]
    
    LazyLoading             <Boolean>       if true, the loaded classes 
                                            methods will NOT be compiled at 
                                            autoload time, but instead when 
                                            first called. This allows for a 
                                            faster load. However, expect short 
                                            pauses later when the methods are
                                            first executed.
                                 
    AutoloadFailedSignal    <Signal>        signal raised if an autoloaded 
                                            classes source is not available.

    LoadedClasses           <Collection>    set of classes that heve been
                                            autoloaded (for later unload)


Related information:

    Smalltalk

Class protocol:

Signal constants
o  autoloadFailedSignal
return the signal raised when an autoload fails

adding/removing autoloaded classes
o  addClass: aClassName
given a name, install a corresponding autoload class stub for it.
Return the (autoload-) stubClass or nil, if no new class was created.

o  addClass: aClassName inCategory: aCategory
given a name, install a corresponding autoload class stub for it.
Return the (autoload-) stubClass or nil, if no new class was created.

o  removeClass: aClass
remove a class from the list of loaded classes

fileOut
o  basicFileOutDefinitionOn: aStream withNameSpace: forceNameSpace withPackage: withPackage
print an expression to define myself on aStream.
Since autoloaded classes don't know their real definition, simply
output some comment string making things clear in the browser.

initialization
o  initialize
initialize either the Autoload class
or load a autoloaded class and initialize it.

lazy compilation
o  compileLazy
return the lazy loading flag - if on, fileIn is much faster,
but pauses are to be expected later, since methods are compiled
when first executed.

o  compileLazy: aBoolean
turn on/off lazy loading - if on, fileIn is much faster,
but pauses are to be expected later, since methods are compiled
when first executed.
If you like it, add a line to your startup file.

loading
o  autoload
use this to force loading
- it is defined a noop in all non-autoloading classes.
Return the loaded class

message catching
o  at: arg
catch at: - redefined because its understood

o  basicNew
catch basicNew - load the class and send it to the real one

o  basicNew: arg
catch basicNew: - load the class and send it to the real one

o  classResources
catch classResources - load the class and resend to the real one

o  comment
return the classes comment.
Autoloaded classes have no comment; but I myself have one

o  copy
catch copy - load the class and resend #copy to the real one

o  doesNotUnderstand: aMessage
caught a message; load the class and retry the message

o  error
catch error - load the class and resend #error to the real one

o  fromString: aString
catch - load the class and send it to the real one

o  inspectorExtraAttributes
extra (pseudo instvar) entries to be shown in an inspector.

o  inspectorExtraNamedFields

o  new
catch new - load the class and resend #new to the real one

o  new: arg
catch new: - load the class and resend #new: it to the real one

o  privateClassesAt: aClassNameString
catch - load the class and send it to the real one

o  readFrom: aStream
catch - load the class and send it to the real one

o  readFrom: aStream onError: exceptionBlock
catch - load the class and send it to the real one

o  readFromString: aString
catch - load the class and send it to the real one

o  readFromString: aString onError: exceptionBlock
catch - load the class and send it to the real one

o  respondsTo: aSelector
catch respondsTo: - load the class and resend #respondsTo: it to the real one

o  value
catch value - load the class and resend #value to the real one

private
o  loadAndResendMessage
common helper to autoload a class and define a subclass of it by sending
the sender-message again.
This is invoked by all #subClass... definition messages.

queries
o  accepts: aSignal
redefined to avoid recursive autoload.
(#autoload eventually raises QueryExceptions.
These exception may send #accepts: to exception classes
that are currently being loaded)

o  isAbstract

o  isBehavior
return true, if the receiver is describing another objects behavior.
Autoloaded classes are definitely; therefore return true.

o  isBeingLoaded
answer true if the class loading is currently in process

o  isBuiltInClass
return true if this class is known by the run-time-system.
Returns false here.

o  isLoaded
return true, if the class has been loaded.
Autoload itself is loaded, subclasses are not.
This allows testing wether a class has already been loaded.

o  loadedClasses
return the set of classes that were autoloaded

o  privateClassesOrAll: allOfThem
an autoloaded class has none

o  wasAutoloaded: aClass
return true, if aClass was autoloaded


Subclasses (direct subclasses only):

    AlphaMask
    ApplicationController
    BIG5EncodedString
    BadRomanNumberFormatError
    CharacterEncoderImplementations::BIG5
    CharacterEncoderImplementations::CNS11643
    CharacterEncoderImplementations::CP437
    CharacterEncoderImplementations::GB2313_1980
    CharacterEncoderImplementations::HANGUL
    CharacterEncoderImplementations::ISO10646_to_JavaText
    CharacterEncoderImplementations::ISO10646_to_SGML
    CharacterEncoderImplementations::ISO10646_to_UTF16BE
    CharacterEncoderImplementations::ISO10646_to_UTF16LE
    CharacterEncoderImplementations::ISO8859_10
    CharacterEncoderImplementations::ISO8859_11
    CharacterEncoderImplementations::ISO8859_13
    CharacterEncoderImplementations::ISO8859_14
    CharacterEncoderImplementations::ISO8859_16
    CharacterEncoderImplementations::ISO8859_3
    CharacterEncoderImplementations::ISO8859_4
    CharacterEncoderImplementations::ISO8859_6
    CharacterEncoderImplementations::ISO8859_8
    CharacterEncoderImplementations::ISO8859_9
    CharacterEncoderImplementations::JIS0201
    CharacterEncoderImplementations::JIS0208
    CharacterEncoderImplementations::JIS0208_to_EUC
    CharacterEncoderImplementations::JIS0208_to_JIS7
    CharacterEncoderImplementations::JIS0212
    CharacterEncoderImplementations::JOHAB
    CharacterEncoderImplementations::KOI7
    CharacterEncoderImplementations::KOI8_R
    CharacterEncoderImplementations::KOI8_U
    CharacterEncoderImplementations::KSC5601
    CharacterEncoderImplementations::MAC_Arabic
    CharacterEncoderImplementations::MAC_CentralEuropean
    CharacterEncoderImplementations::MAC_Croatian
    CharacterEncoderImplementations::MAC_Cyrillic
    CharacterEncoderImplementations::MAC_Dingbats
    CharacterEncoderImplementations::MAC_Farsi
    CharacterEncoderImplementations::MAC_Greek
    CharacterEncoderImplementations::MAC_Hebrew
    CharacterEncoderImplementations::MAC_Iceland
    CharacterEncoderImplementations::MAC_Japanese
    CharacterEncoderImplementations::MAC_Korean
    CharacterEncoderImplementations::MAC_Roman
    CharacterEncoderImplementations::MAC_Romanian
    CharacterEncoderImplementations::MAC_Symbol
    CharacterEncoderImplementations::MAC_Thai
    CharacterEncoderImplementations::MAC_Turkish
    CharacterEncoderImplementations::MS_Arabic
    CharacterEncoderImplementations::MS_EastEuropean
    CharacterEncoderImplementations::MS_Hebrew
    CharacterEncoderImplementations::MS_Symbol
    CharacterEncoderImplementations::MS_Turkish
    CharacterEncoderImplementations::NEXT
    ClassInspectorView
    ClassVariablesInspectorView
    ColorInspectorView
    ColoredListEntry
    CompositePart
    ConvertedValue
    DecNetSocketAddress
    DependentPart
    EWorldIconLibrary
    ExpandableRevisionItem
    FaceReader
    FillingWrapper
    FixedPalette
    GBEncodedString
    GraniteBox
    GraphicsAttributes
    HPLjetIIPrinterStream
    HorizontalSteppingSlider
    ImaginaryResultError
    Insets
    InternalPipeStream
    IrisRGBReader
    KSCEncodedString
    LazyArray
    LazyCons
    ListEditor
    ListViewController
    MDIChildView
    MessageChannel
    MotionButton
    NaiveRomanNumberFormatNotification
    NotANumber
    NoteBookFrameView
    ParagraphSpecification
    PluggableView
    PowerSet
    ProgressNotification
    RCSConflictEditTextView
    RandomTT800
    RoundButtonBorder
    ST80FormReader
    ScreenLock
    SelectionInHierarchyView
    SemaphoreMonitor
    SequenceableCollectionSorter
    SourceRevisionItem
    SplittingWriteStream
    StrokingWrapper
    SunRasterReader
    SystemNotification
    TabControl
    TargaReader
    TerminalApplication
    TextCollectorStream
    Tools::ToDoList
    Tools::ToDoListBrowser
    Tools::ToDoNotification
    TranslucentColor
    UnboundedExternalStream
    UnixPTYStream
    ValueLink
    VerticalRuler
    ViewForwardingController
    WeakValueIdentityDictionary
    WinAPIFunction
    XWDReader


ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 07:51:05 GMT