Autoload.st
changeset 25194 504dea634320
parent 25188 e609f461dd25
equal deleted inserted replaced
25193:d30e6d550796 25194:504dea634320
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1991 by Claus Gittinger
     4  COPYRIGHT (c) 1991 by Claus Gittinger
     3 	      All Rights Reserved
     5 	      All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
    13 
    15 
    14 "{ NameSpace: Smalltalk }"
    16 "{ NameSpace: Smalltalk }"
    15 
    17 
    16 nil subclass:#Autoload
    18 nil subclass:#Autoload
    17 	instanceVariableNames:''
    19 	instanceVariableNames:''
    18 	classVariableNames:'LazyLoading AutoloadFailedSignal LoadedClasses InProgressClasses'
    20 	classVariableNames:'AutoloadFailedSignal InProgressClasses LazyLoading LoadedClasses'
    19 	poolDictionaries:''
    21 	poolDictionaries:''
    20 	category:'Kernel-Classes'
    22 	category:'Kernel-Classes'
    21 !
    23 !
    22 
    24 
    23 !Autoload class methodsFor:'documentation'!
    25 !Autoload class methodsFor:'documentation'!
   542     "Modified (comment): / 12-02-2017 / 10:48:13 / cg"
   544     "Modified (comment): / 12-02-2017 / 10:48:13 / cg"
   543 ! !
   545 ! !
   544 
   546 
   545 !Autoload class methodsFor:'message catching'!
   547 !Autoload class methodsFor:'message catching'!
   546 
   548 
       
   549 askFor:aSelector
       
   550     "catch askFor: - load the class and resend #askFor: to the real one"
       
   551 
       
   552     self == Autoload ifTrue:[
       
   553         ^ super askFor:aSelector
       
   554     ].
       
   555     ^ self doesNotUnderstand:(Message selector:#askFor: argument:aSelector)
       
   556 
       
   557     "
       
   558      Wrapper unload.
       
   559      Wrapper askFor:#isSecret
       
   560     "
       
   561 
       
   562     "Created: / 21-01-2020 / 15:24:04 / Stefan Vogel"
       
   563 !
       
   564 
   547 at:arg
   565 at:arg
   548     "catch at: - redefined because it is understood"
   566     "catch at: - redefined because it is understood"
   549 
   567 
   550     ^ self doesNotUnderstand:(Message selector:#at: argument:arg)
   568     ^ self doesNotUnderstand:(Message selector:#at: argument:arg)
   551 
   569 
   798 isLoaded
   816 isLoaded
   799     "return true, if the class has been loaded.
   817     "return true, if the class has been loaded.
   800      Autoload itself is loaded, subclasses are not.
   818      Autoload itself is loaded, subclasses are not.
   801      This allows testing whether a class has already been loaded."
   819      This allows testing whether a class has already been loaded."
   802 
   820 
   803     ^ (self == Autoload)
   821     ^ self == Autoload
   804 
   822 
   805     "Modified: / 16-02-1998 / 11:57:35 / stefan"
   823     "Modified: / 16-02-1998 / 11:57:35 / stefan"
   806     "Modified (comment): / 27-07-2013 / 15:35:01 / cg"
   824     "Modified (comment): / 27-07-2013 / 15:35:01 / cg"
       
   825     "Modified (format): / 21-01-2020 / 15:25:27 / Stefan Vogel"
   807 !
   826 !
   808 
   827 
   809 loadedClasses
   828 loadedClasses
   810     "return the set of classes that were autoloaded"
   829     "return the set of classes that were autoloaded"
   811 
   830