Eidola home

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:

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:

Signature:

See note on synchronization and concurrent read safety in Container.

Version:
[Development version]
Author:
Paul Cantrell

Inner Class Summary
 class Package.Compilation
           
 
Inner classes inherited from class org.eidola.kernel.Capsule
Capsule.Compilation
 
Inner classes inherited from class org.eidola.kernel.NamedElement
NamedElement.Compilation
 
Inner classes inherited from class org.eidola.kernel.Element
Element.Compilation
 
Inner classes inherited from class org.eidola.kernel.Container
Container.Compilation
 
Fields inherited from class org.eidola.kernel.Capsule
PRIVATE_MEMBERS, PUBLIC_MEMBERS
 
Fields inherited from class org.eidola.kernel.NamedElement
NAME
 
Fields inherited from class org.eidola.kernel.Element
OWNER
 
Fields inherited from class org.eidola.kernel.Container
CONTENTS, debugCompile
 
Fields inherited from class org.eidola.kernel.event.EventBroadcaster
debugEvents
 
Constructor Summary
Package()
          Creates a new empty package.
 
Method Summary
 void dump(int i)
          Dumps the structure of the element to System.out.
protected  Container.Compilation makeNewCompilation()
          Creates a new Package.Compilation of an appropriate type for this container.
 
Methods inherited from class org.eidola.kernel.Capsule
addMember, addPrivate, addPublic, findMember, findPrivate, findPublic, getPrivate, getPublic, removeMember, removePrivate, removePublic, setMembers, setPrivate, setPublic
 
Methods inherited from class org.eidola.kernel.NamedElement
broadcastEvent, getName, getSignatureVersion, setName
 
Methods inherited from class org.eidola.kernel.Element
getFullName, getIndirectOwners, getNamespace, getOwner, handleOwnerEvent, setOwner, toString
 
Methods inherited from class org.eidola.kernel.Container
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, wait, wait, wait
 

Constructor Detail

Package

public Package()
Creates a new empty package.
Method Detail

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

Eidola home