Java domain modeling Release Notes

© Copyright International Business Machines Corporation 2006. All rights reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Release notes

1.0 Limitations
2.0 Known problems and workarounds
   2.1 Refactoring and collection type associations

1.0 Limitations

None

2.0 Known problems and workarounds

2.1 Refactoring and collection type associations

When specifying collection type associations for Java elements on the diagram, the "use generic collections" option should be used. This option is available if the type belongs to a J2SE 5.0 project i.e. compiler settings for the project are set to J2SE 5.0 and a J2SE 5.0 JRE is being used. An example of this field is:

private List<MyClass> listOfMyClass;

When refactoring, Move or Rename, the target of this association (MyClass), the associations on the diagram will automatically be refactored correctly.

If generic collections are not used (either due to user preference or if project is not J2SE 5.0) the collection type information is written in annotations in the javadoc for the field, for example: 
  /**                                                                             
   * @uml.annotations  for <code>class21</code>
                collection_type="myPackage.MyClass"
   */
  private List<MyClass> listOfMyClass;

In this case, if Move refactoring is performed on MyClass, the collection type information will break as the information in the javadoc will not be refactored. The user will have to manually edit the fully qualified name of the class in the javadoc annotation.

For Rename refactoring, to ensure that the refactoring covers the annotation, the "update textual references in comments and strings" option must be checked on the Refactoring wizard. If this is left unchecked, again the collection type information will break and the user will have to manually edit the fully qualified name of the class in the javadoc annotation.