DOC

Procedure for Java code generation from class diagrams in Rational

By Rhonda Ortiz,2014-04-24 11:50
6 views 0
Procedure for Java code generation from class diagrams in Rational

    Procedure for Java code generation from class diagrams in

    Rational Rose

    1. Make sure that c:\jdk1.3\lib\tools.jar (or its equivalent on your PC)

    is in the CLASSPATH environment variable.

    2. Select option Tools-Java-Project Specification and check the

    following:

    ? Class Path tab:

    ? The above directory should be in the Environment Settings

    box.

    ? Add the directory where you want the generated code to be

    placed in the Directories box.

    ? Style tab:

    ? Check Use Spaces and enter 4 in Number to Use in the

    Indentation box

    ? Check both boxes in the Opening Brace box.

    ? Check Javadoc style, @author, @param, @return, @exception,

    and @version in the Comment Style box.

3. Select the class for which you want to generate code and select the

    option Tools-Java-Syntax Check.

4. Fix the syntax errors. Examples of syntax errors are:

    ? Variables specified as an array dimension

    ? Return type not specified for a method

5. Select the class for which you want to generate code and select the

    option Tools-Java-Generate Java. Make sure to select the class for

    which you want to generate code and the directory where the code

    should be place, and click on the Map button. This step might

    produce errors that can be seen in the Log window. If there is an

    error, it will not generate code. It will generate code if there are

    only warnings. An examples of an error during code generation is

    when a role name the same as an attribute name

The code that is generated is not much. It needs to be formatted to

    the documentation format required by the coding standard. For

    example, some of the documentation is not on a new line, it generates

    a @roseuid tag that needs to be deleted, the first line can also be

    deleted. Also, the preconditions and postconditions have to be copied

    and pasted.

    Because the Rose model is going to serve as technical documentation, it is important that it reflects the changes being made during this process.

    1. Check out the Rose model. 2. Make necessary changes due to code generation. 3. Check in the Rose model.

    A new version of the Rose model and the design document will be created at the end of each code development phase.

? Phase I: Berkeley DB

    ? Phase II: Netscape Keystore ? Phase III: NDBS Keystore

Report this document

For any questions or suggestions please email
cust-service@docsford.com