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
Constructor Summary |
Namespace()
Creates a new empty namespace. |
ROOT
public static final ContainerPart ROOT
- Part of an container.
- See Also:
StructureChanged
Namespace
public Namespace()
- Creates a new empty namespace. The new namespace won't be valid
until somebody gives it a root element.
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