There are two main situations when it comes to using external libraries depending on whether you need to see and use the classes defined in the external libraries in the model or not.
If you want to see the library classes in the model and the relationships between your project and the library then you have to use a modeled library ideally contained in a Model Component.
On the contrary if the contents of the external library are not important in the model and is only needed for compilation purposes, you don’t have to deal with anything special other than classpath considerations.
Using a modeled library
In order to visualize and use the libraries contents in the model than you have to:
-
First try to find an existing component in the Modelio store.
-
Otherwise reverse the library your self and ideally make it a model component (RAMC) that you will reuse for other projects.
The main benefit of this approach is that all the relationships between your project classes and the library objects will be modeled properly in the model. This is the more precise, reliable and rigorous approach.
The additional cost is really light if you can find an existing model component for your library in the Modelio Store, this is why this is the first thing to check. However, even reversing the library yourself is not so costly when you consider that this task is an investment that you will be able to reuse in further projects
Leaving the library out of the model
If the contents of the external library are not important in the model and only needed for compilation purposes, you don’t have to deal with anything special other than classpath considerations.
If external classes are anyway used in the model, for example after a code reverse operation, Java Architect will use alternative annotations to represent the missing objects and relationships ensuring that the next code generation will work perfectly.