Tracing Associations
[Previous]  [Next] 
|
User Manual [Previous]  [Next] Tracing AssociationsAssociations describe the relationships between class instances; role names are used to clarify the relation at both ends of an association. MOTL allows the tracing of associations by referring to the role names. Tracing can occur whenever an association link is added or deleted at run time:
Example// This example will record any addition/removal // to supervisor assoc link class Student { Integer id; } @SuppressWarnings("deprecation") class Professor { 1 -- * Student supervisor; trace supervisor; } // @@@skipphpcompile See issue 596 (PHP tracing causes issues) Load the above code into UmpleOnline Another Example// This example will record any addition to // assoc link 'supervisor' class Student { Integer id; } @SuppressWarnings("deprecation") class Professor { 1 -- * Student supervisor; trace add supervisor; } // @@@skipphpcompile See issue 596 (PHP tracing causes issues) Load the above code into UmpleOnline Another Example// This example will record any removal of any // supervisor assoc link class Student { Integer id; } @SuppressWarnings("deprecation") class Professor { 1 -- * Student supervisor; trace remove supervisor; } // @@@skipphpcompile See issue 596 (PHP tracing causes issues) Load the above code into UmpleOnline SyntaxtraceDirective : trace [[Prefix]]? [[traceEntity]] [[Postfix]] ; traceEntity- : [traceEntity]  ((  )?  ()  )?  ( , [traceEntity]  ((  )?  ()  )?  )* |