Once you've added elements to a model, you can create one or more views to visualise parts of the model, which can subsequently be rendered as diagrams by a number of different tools.
Structurizr for Java supports the following view types described in the C4 model, and the Java classes implementing these views can be found in the com.structurizr.view package as follows:
-
Core diagrams
-
Supplementary diagrams
Please note that code diagrams (level 4 of the C4 model) are not supported.
Creating views
All views are associated with a ViewSet, which is created for you when you create a workspace.
Workspace workspace = new Workspace("Getting Started", "This is a model of my software system."); ViewSet views = workspace.getViews();
Use the various create*View methods on the ViewSet class to create views.