|
From: Javier O'H. <j....@ti...> - 2003-02-10 22:25:43
|
From: Carsten Zerbst <carsten@at...>
>Java Beans ?
>2003-01-28 03:47
>
> Hello all,
>
> you say on the web site, that dia2code supports java beans, therefore i
> expect a getter and setter to be generated for each attribute.
> How to switch this behaviour on ?
Have you looked into the README? You need to specify "JavaBean" as the
stereotype of the class. Granted, it's not very flexible, but the feature
has been there for at least 2 years.
Looking into the sourcecode is as simple as:
$ grep -i JavaBean dia2code/*{c,h}
dia2code/parse_diagram.c:void make_javabean_methods(umlclass *myself) {
dia2code/parse_diagram.c: if ( ! strcmp(myself->stereotype,
"JavaBean")) {
dia2code/parse_diagram.c: /* Javabean: we should now add a
get() and set() methods
dia2code/parse_diagram.c: make_javabean_methods(myself);
Bye,
Xav
|