|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 Map |
definition
|
private static String |
FILE_NAME
|
private static Logger |
LOG
|
Constructor Summary | |
EventTreeDefinition()
Create an instance of EventTreeDefinition, reading org/argouml/eventtree.xml to obtain the initial configuration. |
Method Summary | |
(package private) void |
addSource(Class cSource,
Map mpNameMap)
Add event types for a single source to this event tree. |
(package private) void |
addSourcesFromDocument(Document doc)
Add all event sources described by the given document. |
private Class |
formatClass(Class inputClass)
|
EventKey[] |
getEventTypes(Class modelClass)
Returns all eventkeys that an instance of the given modelClass could possibly fire. |
EventKey[] |
getEventTypes(Class modelClass,
String name)
Returns all EventKeys (eventdefinitions) with the given eventName that the given modelClass can fire. |
private Document |
loadDocument()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final Logger LOG
private static final String FILE_NAME
private Map definition
Constructor Detail |
public EventTreeDefinition()
Method Detail |
void addSourcesFromDocument(Document doc)
<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(Class cSource, 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(Class modelClass)
modelClass
-
public EventKey[] getEventTypes(Class modelClass, String name)
modelClass
- name
-
private Document loadDocument()
private Class formatClass(Class inputClass)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |