eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'NameSpace':

Home

everywhere
www.exept.de
for:
[back]

Class: NameSpace


Inheritance:

   Object
   |
   +--NameSpace
      |
      +--Authentication
      |
      +--CharacterEncoderImplementations
      |
      +--Comanche
      |
      +--Demos
      |
      +--Dolphin
      |
      +--FCGI
      |
      +--HTML
      |
      +--ReadMe
      |
      +--Squeak
      |
      +--SunRPC
      |
      +--Tools
      |
      +--V
      |
      +--XML

Package:
stx:libbasic
Category:
Kernel-Classes
Version:
rev: 1.69 date: 2009/12/03 10:42:57
user: stefan
file: NameSpace.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Claus Gittinger

Description:


A NameSpace is actually a dummy class, providing a home
for its private classes. 
Thus, internally, the same mechanism is used for classes in
a NameSpace and private classes.
This has two advantages:
    - we only need one mechanism for both namespaces
      and private classes

    - there are no possible conflicts between a class
      and a namespace named alike.


Related information:

    Behavior
    ClassDescription
    Class
    Metaclass
    PrivateMetaclass

Class protocol:

Compatibility-VW5.4
o  defineClass: name superclass: superclass indexedType: indexed private: private instanceVariableNames: instVars classInstanceVariableNames: classInstVars imports: imports category: category

o  defineClass: name superclass: superclassOrName indexedType: indexed private: private instanceVariableNames: instVars classInstanceVariableNames: classInstVars imports: imports category: category attributes: annotations
VW5i compatibility class/namespace creation

o  defineNameSpace: nameSymbol private: private imports: imports category: category

accessing
o  allClasses

o  allClassesWithAllPrivateClasses

o  at: classNameSymbol
return a class from the namespace defined by the receiver

o  at: classNameSymbol ifAbsent: exceptionBlock
return a class or an alternative
from the namespace defined by the receiver

o  at: aKey ifPresent: aBlock
try to retrieve the value stored at aKey.
If there is nothing stored under this key, do nothing.
Otherwise, evaluate aBlock, passing the retrieved value as argument.

o  at: classNameSymbol put: aClass
add a class to the namespace defined by the receiver

o  classNamed: aString
return the class with name aString, or nil if absent.
To get to the metaClass, append ' class' to the string.

o  classNames

o  includesKey: aClassNameStringOrSymbol
return true if such a key is present

o  loadedClassNamed: aString
return the class with name aString, or nil if absent.
To get to the metaClass, append ' class' to the string.
Do not autoload the owning class of a private class.

o  package

enumerating
o  allBehaviorsDo: aBlock
enumerate all classes in this namespace

o  allClassesDo: aBlock
enumerate all classes in this namespace

o  allMethodsDo: aBlock
enumerate all methods in this namespace's classes

o  allMethodsWithSelectorDo: aBlock
enumerate all methods in the Smalltalk namespace's classes

o  keys
enumerate all class names in this namespace

o  keysDo: aBlock
enumerate all class names in this namespace

fileOut
o  fileOutDefinitionOn: aStream
redefined to generate another definition message

fileOut-xml
o  fileOutXMLDefinitionOn: aStream
redefined to generate another definition message

inspecting
o  inspectorClass
redefined to launch a DictionaryInspector
(instead of the default Inspector).

instance creation
o  fullName: aFullNameSpacePathName
given a possibly nested name of a namespace, create all required
intermediate spaces (if not already existing) and return the
bottom-level space.

o  name: aStringOrSymbol
create a new nameSpace, named aStringOrSymbol.
Notice, that the nameSpace is created in the current one -
dont get confused; we recommend, not to nest them too much.

o  new
catch new - namespaces are not to be created by the user

printing & storing
o  displayString
return a printed represenation - here, a reminder is appended,
that this is not a regular class

queries
o  allNameSpaces
return a list of all namespaces

o  allNameSpacesIn: anEnvironment
return a list of all namespaces

o  allNamespaces
return a list of all namespaces

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  allNamespacesIn: anEnvironment
return a list of all namespaces

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  canHaveExtensions
return true, if this class allows extensions from other packages.
Private classes, namespaces and projectDefinitions dont allow this

o  hasNameSpaces
return true - if I support sub-namespaces

o  hasNamespaces
return true - if I support sub-namespaces

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  isNameSpace
return true, if the receiver is a nameSpace.
Unconditionally true here for subclasses - my subclasses are namespaces

o  isRealNameSpace
return true, if the receiver is a nameSpace, but not Smalltalk (which is also a class).
Unconditionally true here for subclasses - my subclasses are namespaces

o  isTopLevelNameSpace

o  isTopLevelNamespace
obsolete - use isTopLevelNameSpace

** This is an obsolete interface - do not use it (it may vanish in future versions) **



ST/X 6.1.1; WebServer 1.620 at exept:8081; Tue, 22 May 2012 21:20:57 GMT