Step 3: Generating Java Source Code from the Class Model |
![]() Previous |
![]() Next |
This task takes you through the steps required to generate Java source code from the class model you have created. Once you have generated the Java source code you will update the code and observe the effect this has on the diagram. This shows how JDeveloper synchronizes the code and class model.
OrderObservable
and the Java class Order
. Select OrderObservable
,
and holding down the CTRL key, select Order
so that they both have visible handles. Choose Generate
| Java from the context menu. Notice that these Java classes now appear
in the Navigator as OrderObservable.java and Order.java.isPacked()
, and make the return
type boolean. Go back to the class diagram
and see how this change is reflected in the diagram.Now that you have generated source code from the class diagram, you are ready to proceed to the last part of the tutorial, Step 4 - Extending the Model by Reverse-Engineering an Existing Class, which describes how to extend the model by adding an existing class to the project and adding it to the diagram.