Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Sequence Diagram to Java Code ATL Transformations
Re: Sequence Diagram to Java Code ATL Transformations [message #626876] Fri, 15 August 2008 14:59
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Hugo,

I think answers to your questions rely on understanding what a sequence
diagram means, so I'll be of little help in that regard. More likely
someone with UML knowledge can help, so I've added the UML2 newsgroup to
the "to" list of the reply.


Hugo Marques wrote:
> Hello,
>
> I am currently developing a tool for generating Java code from UML
> sequence diagrams. In this context, I have two doubts and should be
> grateful if someone could help me.
>
> Doubts:
>
> 1 - Concerning the instantiation of the objects represented by the
> lifelines, these objects should be translated a) as attributes from
> other objects
> class {
> private LifelineObject1 l1;
> private LifelineObject1 l2;
>
> }
>
>
> b) as parameters taken in the method generated to the sequence diagram?
> returnType method(LifelineObject1 l1, LifelineObject2 l2) { ... }
>
> 2- Concerning control flow of the method. For example, consider a
> sequence diagrama named test that has three lifelines ( l1, l2 and
> l3), where l1 sends a message msg1() to l2 that in turn sends a
> message msg2() to l3. Which would be the correct translation (see the
> options below) from this flow to the java code?
>
> a) All messages in the same method but from different classes.
> class l1 {
> test() {
> l2.msg1();
> l3.msg2():
> }
> }
>
> b) All messages in the same method and class.
>
> class l1 {
> test() {
> self.msg1();
> self.msg2();
> }
> }
>
>
> c) Messages from different classes and differente methods.
> class l1 {
> test() {
> l2.msg1();
> }
> }
>
> class l2 {
> msg1() {
> l3.msg2();
> }
> }
> Thanks in advance for any help,
>
>
> Best regards,
> Hugo Marques
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Setting Is Unique property - where is it implemented?
Next Topic:Re: Sequence Diagram to Java Code ATL Transformations
Goto Forum:
  


Current Time: Fri Apr 26 16:19:11 GMT 2024

Powered by FUDForum. Page generated in 0.03115 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top