|
Eidola home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.eidola.kernel.event.EventBroadcaster
|
+--org.eidola.kernel.Container
|
+--org.eidola.kernel.Element
|
+--org.eidola.kernel.NamedElement
|
+--org.eidola.kernel.Capsule
An element which encapsulates a unit of a program by holding member elements in public and private sections.
Structure:
Signature:
See note on synchronization and concurrent read safety in Container.
| Inner Class Summary | |
class |
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 |
| Field Summary | |
static ContainerPart |
PRIVATE_MEMBERS
Part of a capsule. |
static ContainerPart |
PUBLIC_MEMBERS
Part of a capsule. |
| 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 | |
Capsule()
Creates a new empty capsule. |
|
| Method Summary | |
void |
addMember(NamedElement mem,
boolean inPublic)
Adds a member to this capsule. |
void |
addPrivate(NamedElement mem)
Adds a private member to this capsule. |
void |
addPublic(NamedElement mem)
Adds a public member to this capsule. |
NamedElement |
findMember(String memName,
boolean inPublic)
Finds a member by name. |
NamedElement |
findPrivate(String memName)
Finds a private member by name. |
NamedElement |
findPublic(String memName)
Finds a public member by name. |
Set |
getPrivate()
Returns the private members of this capsule. |
Set |
getPublic()
Returns the public members of this capsule. |
void |
removeMember(NamedElement mem,
boolean inPublic)
Removes a member from this capsule. |
void |
removePrivate(NamedElement mem)
Removes a private member from this capsule. |
void |
removePublic(NamedElement mem)
Removes a public member from this capsule. |
void |
setMembers(Collection newMems,
boolean setPub)
Sets either the public or private members of this capsule. |
void |
setPrivate(Collection newPriv)
Sets the private members of this capsule. |
void |
setPublic(Collection newPub)
Sets the public members of this capsule. |
| 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, dump, finalize, getCompilation, getCompileVersion, getStructureVersion, handleContentEvent, handleSelfEvent, makeNewCompilation |
| 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 |
| Field Detail |
public static final ContainerPart PUBLIC_MEMBERS
StructureChangedpublic static final ContainerPart PRIVATE_MEMBERS
StructureChanged| Constructor Detail |
public Capsule()
| Method Detail |
public Set getPublic()
public Set getPrivate()
public NamedElement findPublic(String memName)
memName - The member name to look for.public NamedElement findPrivate(String memName)
memName - The member name to look for.
public NamedElement findMember(String memName,
boolean inPublic)
memName - The member name to look for.inPublic - Search in public (true) or private (false) members.
public void addPublic(NamedElement mem)
throws IllegalElementType
Events: StructureChanged, SignatureChanged
mem - The member to add.IllegalElementType - If mem is null.
public void addPrivate(NamedElement mem)
throws IllegalElementType
Events: StructureChanged, SignatureChanged
mem - The member to add.IllegalElementType - If mem is null.
public void addMember(NamedElement mem,
boolean inPublic)
throws IllegalElementType
Events: StructureChanged, SignatureChanged
mem - The member to add.inPublic - Makes the element a public (true) or private (false) member.IllegalElementType - If mem is null.public void removePublic(NamedElement mem)
Events: StructureChanged, SignatureChanged
mem - The member to remove.public void removePrivate(NamedElement mem)
Events: StructureChanged, SignatureChanged
mem - The member to remove.
public void removeMember(NamedElement mem,
boolean inPublic)
Events: StructureChanged, SignatureChanged
mem - The member to remove.inPublic - Removes the element from the public (true) or private (false) members.
public void setPublic(Collection newPub)
throws IllegalElementType
Events: StructureChanged, SignatureChanged
newPub - A collection of NamedElements which will be the new
public members. This method makes an internal copy of this collection,
so it is safe to pass a collection and subsequently modify it.IllegalElementType - If one of the new members is null or not a named element.
public void setPrivate(Collection newPriv)
throws IllegalElementType
Events: StructureChanged, SignatureChanged
newPriv - A collection of NamedElements which will be the new
private members. This method makes an internal copy of this collection,
so it is safe to pass a collection and subsequently modify it.IllegalElementType - If one of the new members is null or not a named element.
public void setMembers(Collection newMems,
boolean setPub)
throws IllegalElementType
Events: StructureChanged, SignatureChanged
newMems - A collection of NamedElements which will be the new
members. This method makes an internal copy of this collection,
so it is safe to pass a collection and subsequently modify it.setPub - Set the public (true) or private (false) members.IllegalElementType - If one of the new members is null or not a named element.
|
Eidola home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||