Class Documenter
java.lang.Object
org.springframework.modulith.docs.Documenter
API to create documentation for
ApplicationModules
.- Author:
- Oliver Drotbohm
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Options to tweak the rendering of diagrams. -
Constructor Summary
ConstructorDescriptionDocumenter
(Class<?> modulithType) Creates a newDocumenter
for theApplicationModules
created for the given modulith type in the default output folder (spring-modulith-docs
).Documenter
(ApplicationModules modules) Creates a newDocumenter
for the givenApplicationModules
instance in the default output folder (spring-modulith-docs
).Documenter
(ApplicationModules modules, String outputFolder) Creates a newDocumenter
for the givenApplicationModules
and output folder. -
Method Summary
Modifier and TypeMethodDescription(package private) ApplicationModules
(package private) String
toModuleCanvas
(ApplicationModule module) (package private) String
toModuleCanvas
(ApplicationModule module, String apiBase) (package private) String
toModuleCanvas
(ApplicationModule module, Documenter.CanvasOptions options) (package private) String
withOutputFolder
(String outputFolder) Deprecated, for removal: This API element is subject to removal in a future version.Writes all available documentation: The entire set of modules as overview component diagram. Individual component diagrams per module to include all upstream modules. The Module Canvas for each module. usingDocumenter.DiagramOptions.defaults()
andDocumenter.CanvasOptions.defaults()
.writeDocumentation
(Documenter.DiagramOptions options, Documenter.CanvasOptions canvasOptions) Writes all available documentation: The entire set of modules as overview component diagram. Individual component diagrams per module to include all upstream modules. The Module Canvas for each module.Writes the component diagrams for all individual modules.Writes the PlantUML component diagram for the givenApplicationModule
.writeModuleAsPlantUml
(ApplicationModule module, Documenter.DiagramOptions options) Writes the PlantUML component diagram for the givenApplicationModule
with the given renderingDocumenter.DiagramOptions
.Writes all module canvases usingDocumenter.DiagramOptions.defaults()
.Writes all module canvases using the givenDocumenter.DiagramOptions
.Writes the PlantUML component diagram for allApplicationModules
usingDocumenter.DiagramOptions.defaults()
.Writes the PlantUML component diagram for allApplicationModules
with the givenDocumenter.DiagramOptions
.
-
Constructor Details
-
Documenter
Creates a newDocumenter
for theApplicationModules
created for the given modulith type in the default output folder (spring-modulith-docs
).- Parameters:
modulithType
- must not be null.
-
Documenter
Creates a newDocumenter
for the givenApplicationModules
instance in the default output folder (spring-modulith-docs
).- Parameters:
modules
- must not be null.
-
Documenter
Creates a newDocumenter
for the givenApplicationModules
and output folder.- Parameters:
modules
- must not be null.outputFolder
- must not be null or empty.
-
-
Method Details
-
withOutputFolder
Deprecated, for removal: This API element is subject to removal in a future version.Customize the output folder to write the generated files to. Defaults to "spring-modulith-docs".- Parameters:
outputFolder
- must not be null or empty.- Returns:
- will never be null.
-
writeDocumentation
Writes all available documentation:- The entire set of modules as overview component diagram.
- Individual component diagrams per module to include all upstream modules.
- The Module Canvas for each module.
Documenter.DiagramOptions.defaults()
andDocumenter.CanvasOptions.defaults()
.- Returns:
- the current instance, will never be null.
-
writeDocumentation
public Documenter writeDocumentation(Documenter.DiagramOptions options, Documenter.CanvasOptions canvasOptions) Writes all available documentation:- The entire set of modules as overview component diagram.
- Individual component diagrams per module to include all upstream modules.
- The Module Canvas for each module.
- Parameters:
options
- must not be null.canvasOptions
- must not be null.- Returns:
- the current instance, will never be null.
-
writeModulesAsPlantUml
Writes the PlantUML component diagram for allApplicationModules
usingDocumenter.DiagramOptions.defaults()
.- Returns:
- the current instance, will never be null.
-
writeModulesAsPlantUml
Writes the PlantUML component diagram for allApplicationModules
with the givenDocumenter.DiagramOptions
.- Parameters:
options
- must not be null.- Returns:
- the current instance, will never be null.
-
writeIndividualModulesAsPlantUml
-
writeIndividualModulesAsPlantUml
Writes the component diagrams for all individual modules.- Parameters:
options
- must not be null.- Returns:
- the current instance, will never be null.
-
writeModuleAsPlantUml
Writes the PlantUML component diagram for the givenApplicationModule
.- Parameters:
module
- must not be null.- Returns:
- the current instance, will never be null.
-
writeModuleAsPlantUml
public Documenter writeModuleAsPlantUml(ApplicationModule module, Documenter.DiagramOptions options) Writes the PlantUML component diagram for the givenApplicationModule
with the given renderingDocumenter.DiagramOptions
.- Parameters:
module
- must not be null.options
- must not be null.- Returns:
- the current instance, will never be null.
-
writeModuleCanvases
Writes all module canvases usingDocumenter.DiagramOptions.defaults()
.- Returns:
- the current instance, will never be null.
-
writeModuleCanvases
Writes all module canvases using the givenDocumenter.DiagramOptions
.- Parameters:
options
- must not be null.- Returns:
- the current instance, will never be null.
-
toModuleCanvas
-
toModuleCanvas
-
toModuleCanvas
-
getModules
ApplicationModules getModules() -
toPlantUml
String toPlantUml()
-
Documenter(org.springframework.modulith.core.ApplicationModules,java.lang.String)
directly.