|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.argouml.model.uml.EventTreeDefinition
Class containing the definitions of all events in NSUML. The file eventtree.xml is loaded by this class and converted to a hashmap containing the classes firing events as keys and hashmaps containing eventnames as keys and eventtypes as values as values.
Field Summary | |
---|---|
private java.util.Map |
_definition
|
private Logger |
_log
|
private static java.lang.String |
FILE_NAME
|
Constructor Summary | |
---|---|
EventTreeDefinition()
Create an instance of EventTreeDefinition, reading org/argouml/eventtree.xml to obtain the initial configuration. |
Method Summary | |
---|---|
(package private) void |
addSource(java.lang.Class cSource,
java.util.Map mpNameMap)
Add event types for a single source to this event tree. |
(package private) void |
addSourcesFromDocument(org.w3c.dom.Document doc)
Add all event sources described by the given document. |
private java.lang.Class |
formatClass(java.lang.Class inputClass)
|
EventKey[] |
getEventTypes(java.lang.Class modelClass)
Returns all eventkeys that an instance of the given modelClass could possibly fire. |
EventKey[] |
getEventTypes(java.lang.Class modelClass,
java.lang.String name)
Returns all EventKeys (eventdefinitions) with the given eventName that the given modelClass can fire. |
private org.w3c.dom.Document |
loadDocument()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Logger _log
private static final java.lang.String FILE_NAME
private java.util.Map _definition
Constructor Detail |
public EventTreeDefinition()
Method Detail |
void addSourcesFromDocument(org.w3c.dom.Document doc)
Add all event sources described by the given document. The document must match the pattern given by the following example:
<eventtree> <source classname="classname of a model element"> <eventtype name="event fired by this model element"> <type>1</type> </eventtype> </source> </eventtree>The classname is fully qualified.
The type is one of the numbers defined in MElementEvent
. Each
of the elements can be used multiple times.
doc
- the document, the contents of which should be added to this
event tree definition. This must be preparsed.void addSource(java.lang.Class cSource, java.util.Map mpNameMap)
cSource
- the source class for which to add event types.mpNameMap
- a map of the event types to add for the source class.
The keys are Strings indicating the names of events,
while the values are int[] which contain all the event
types the indicated event represents. The specific int
values used can be found in MElementEvent
.public EventKey[] getEventTypes(java.lang.Class modelClass)
modelClass
-
public EventKey[] getEventTypes(java.lang.Class modelClass, java.lang.String name)
modelClass
- name
-
private org.w3c.dom.Document loadDocument()
private java.lang.Class formatClass(java.lang.Class inputClass)
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20040306) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |