Eidola home

org.eidola.kernel
Class Namespace

java.lang.Object
  |
  +--org.eidola.kernel.event.EventBroadcaster
        |
        +--org.eidola.kernel.Container
              |
              +--org.eidola.kernel.Namespace

public class Namespace
extends Container

The top container in the container hierarchy. A namespace generally corresponds to a physical unit of a program -- the code within a namespace is stored in the same place and the same way. Full names of elements are unique within a namespace. A namespace has a single root element, typically a package.

Version:
[Development version]
Author:
Paul Cantrell

Inner Class Summary
 class Namespace.Compilation
           
 
Inner classes inherited from class org.eidola.kernel.Container
Container.Compilation
 
Field Summary
static ContainerPart ROOT
          Part of an container.
 
Fields inherited from class org.eidola.kernel.Container
CONTENTS, debugCompile
 
Fields inherited from class org.eidola.kernel.event.EventBroadcaster
debugEvents
 
Constructor Summary
Namespace()
          Creates a new empty namespace.
 
Method Summary
 void dump(int i)
          Does a debug dump of this container to System.out.
 Namespace getNamespace()
          Returns this namespace.
 Element getRoot()
          Returns the root element of the namespace.
protected  Container.Compilation makeNewCompilation()
          Creates a new Namespace.Compilation of an appropriate type for this container.
 void setRoot(Element root)
          Changes the root element of the namespace.
 
Methods inherited from class org.eidola.kernel.Container
broadcastEvent, compile, finalize, getCompilation, getCompileVersion, getStructureVersion, handleContentEvent, handleSelfEvent
 
Methods inherited from class org.eidola.kernel.event.EventBroadcaster
addListener, removeListener, updateBroadcasters
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT

public static final ContainerPart ROOT
Part of an container.
See Also:
StructureChanged
Constructor Detail

Namespace

public Namespace()
Creates a new empty namespace. The new namespace won't be valid until somebody gives it a root element.
Method Detail

getNamespace

public Namespace getNamespace()
Returns this namespace.
Overrides:
getNamespace in class Container

getRoot

public Element getRoot()
Returns the root element of the namespace.

setRoot

public void setRoot(Element root)
             throws IllegalElementType
Changes the root element of the namespace.

makeNewCompilation

protected Container.Compilation makeNewCompilation()
Description copied from class: Container
Creates a new Container.Compilation of an appropriate type for this container. This method only exists because Java does not use runtime types to resolve inner class names; in other words, there are no virtual inner classes. Under normal circumstances, you will not need to call this method directly; use Container.compile() instead. It is a good idea to synchronize on the container when calling this method.
Overrides:
makeNewCompilation in class Container

dump

public void dump(int i)
Description copied from class: Container
Does a debug dump of this container to System.out.
Overrides:
dump in class Container

Eidola home