Available source files

Usually a java project is composed of its own model and source files. During a reverse operation (or a round trip mode update), all those files are considered accessible: links are always created in the model to the corresponding classes.

Note

Each «Java Component» can define its own source path, meaning a java project can use several source directories at the same time.

Defining the reverse classpath

Often, other elements are needed, which are essential to the project but do not actually belong to it. They usually correspond to external libraries (Jar files), or some other parts of the project not yet in the model.

All used JAR files must be declared in the project configuration. To define them,

  1. Right click on the root package

  2. Select moduleJava Architect→configurationgroupConfiguration→editclasspathEdit accessible classes

  3. The following dialog shows up:

    Reverse classpath dialog

    Use:

    ➊ Add button: to add .jar archives
    ➋ Delete button: select archives to remove then click the button
    ➌ Up and down: to reorder archives. The order may be important if a class is defined in many archives.

Type references resolution

When a reference to a type (extends link, parameter…) is found and needs to be reversed, Java Designer goes through several steps:

  • Is this java type accessible in the project sources (.java) or in the configuration (.jar)?

    • Not found means the type won’t be searched in the model: all references are replaced by tagged values, making the model partially inaccurate.

      The configuration may need to be completed, or the model to be generated. A "Type not found" warning is also added to the report.

    • Type found in accessible classes, search in the model.
      Is this type found in the model?

      • Yes, update its content.

      • Not found in the model, it will be created.
        Is this type part of the files to reverse ?

        • Yes, type is created in the model with all its content.

        • No, type is created in the model as an "External element". An "External element creation" warning is also added to the report.

          Note

          An "External Element" is an empty placeholder. It is recommended either to reverse it, or to use a Model Component (RAMC) that contains it. The Java code of an external element is never generated.