org.eidola.kernel
Class Package
java.lang.Object
|
+--org.eidola.kernel.event.EventBroadcaster
|
+--org.eidola.kernel.Container
|
+--org.eidola.kernel.Element
|
+--org.eidola.kernel.NamedElement
|
+--org.eidola.kernel.Capsule
|
+--org.eidola.kernel.Package
- public class Package
- extends Capsule
The largest unit in Eidola's hierarchical namespace.
Packages serve several purposes:
- to group conceptually related elements into a module,
- to prevent namespace collisions between modules, and
- to allow modules to encapsulate on a scale larger than classes.
Paul pontificates:
Packages can currently be members of classes. This may be fine in a basic
structural sense, but I'm not sure what it means at runtime, or whether
it means anything. A package within a class is probably just a way of
doing internal encapsulation -- probably an excellent idea (though there may
be better ways of doing it). If this is what it means, the signature propagation
rules need to change. It might also be a way of doing static members,
in which case the current signature rules are OK, but again there's probably
a better way of doing this.
Structure:
- name
- owner
- public members
- private members
Signature:
- packages only specialize themselves, so nothing affects the signature
See note on synchronization and concurrent read safety in Container
.
- Version:
- [Development version]
- Author:
- Paul Cantrell
Constructor Summary |
Package()
Creates a new empty package. |
Methods inherited from class org.eidola.kernel.Capsule |
addMember, addPrivate, addPublic, findMember, findPrivate, findPublic, getPrivate, getPublic, removeMember, removePrivate, removePublic, setMembers, setPrivate, setPublic |
Package
public Package()
- Creates a new empty package.
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)
- Dumps the structure of the element to System.out.
- Overrides:
dump
in class Container
- Parameters:
i
- Number of spaces to Util.indent