Book a Demo

Author Topic: Generate a Java collection  (Read 3122 times)

mbordin

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Generate a Java collection
« on: August 31, 2007, 07:37:52 am »
Hello all,
I'd like to define an attribute of a collection of string, (or collection of something) and than generate a java code for this class.
I do not know how to design tha class.
Could some of us tell em how I have to set the attribute to obtain a collection in a java code

Thanks
Matteo

jkorman

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Generate a Java collection
« Reply #1 on: August 31, 2007, 09:01:18 am »
Try the following



By setting the Member Type on the Target Role, that type will be used to generate the container type. (See the generated code in the text box)

Jim

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Generate a Java collection
« Reply #2 on: August 31, 2007, 11:11:03 am »
There is also a related setting in the Tools | Options | Source Code Engineering | Java (or any other language) dialog.

There is a Collection Classes dialog opened by a button of the same name.

Note: you must have a project open to enable this button. AFAIK the settings on this dialog are project-specific.

David
No, you can't have it!