Book a Demo

Author Topic: UML2 to Java Collection issue  (Read 11422 times)

flavio

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
UML2 to Java Collection issue
« on: August 01, 2009, 12:48:06 am »
I have an issue or understanding problem how to define correctly a composition between two classes and transform it in java lagguange.

I create two classes ClassA and ClassB where ClassB is part of ClassA
in a PIM class model with multeplicity 0..* . If a directly transform the model into java or into Java PSM I'm aspecting to have an attribute or a method that return a Colelction of ClassB inside ClassB.
BTW the attribute is expressed as single ClassB.

Do yuo know what is wrong?

Cheers

Flavoi

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: UML2 to Java Collection issue
« Reply #1 on: August 01, 2009, 12:51:07 am »
Try setting the advanced properties of the attribute. You should be able to designate it as a collection class. Create and save the attribute, then use the Advanced button to bring up the correct dialog.

[edit]Oops...

I just realized that you are trying to do this from a transformation rather than by hand. The above is not relevant in this case. I will leave the post though, in case it helps those working through the UI.[/edit]
« Last Edit: August 01, 2009, 12:53:19 am by Midnight »
No, you can't have it!