Version: 1.2-alpha (using KDE KDE 3.1.2) Installed from: Debian stable Packages Compiler: gcc version 2.95.4 20011002 (Debian prerelease) OS: Linux the modifiers for automatically created getters and setters in generated code are the same as the modifiers for the attributes where they should be public.
I believe that this has been fixed. You can now choose to set the get/set accessor method scope (visibility) according to a fixed choice, or the parent attribute/role visibility.
fixed by Brian Thomas some time ago
If it is possible to differentiate the accessor method scope from the attribute scope, I don't see a way to indicate this in the interface. To be truly useful for Java code generation, here are the rules: - if scope is private, create a private field with *no* accessors. - if scope is public, create a *private* field with *public*-scope accessors. // Fields private int myPrivateAttribute; private int myPublicAttribute; ... // Accessor methods // There should be no accessors for myPrivateAttribute! /** * Set the value of myPublicAttribute * @param newVar the new value of myPublicAttribute */ private void setMyPublicAttribute ( int newVar ) { myPublicAttribute = newVar; } /** * Get the value of myPublicAttribute * @return the value of myPublicAttribute */ private int getMyPublicAttribute ( ) { return myPublicAttribute; }
Aargh! now my comments have the bug: accessors should be: /** * Set the value of myPublicAttribute * @param newVar the new value of myPublicAttribute */ public void setMyPublicAttribute ( int newVar ) { myPublicAttribute = newVar; } /** * Get the value of myPublicAttribute * @return the value of myPublicAttribute */ public int getMyPublicAttribute ( ) { return myPublicAttribute; }