Class Documenter
java.lang.Object
org.springframework.modulith.docs.Documenter
API to create documentation for
ApplicationModules
.- Author:
- Oliver Drotbohm, Cora Iberkleid, Tobias Haindl, Alexander Miller
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
Options to tweak the rendering of diagrams.static class
(package private) static class
-
Constructor Summary
ConstructorsConstructorDescriptionDocumenter
(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) Deprecated, for removal: This API element is subject to removal in a future version.Documenter
(ApplicationModules modules, Documenter.Options options) 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
Writes aggregating document calledall-docs.adoc
that includes any existing component diagrams and canvases. usingDocumenter.DiagramOptions.defaults()
andDocumenter.CanvasOptions.defaults()
.writeAggregatingDocument
(Documenter.DiagramOptions diagramOptions, Documenter.CanvasOptions canvasOptions) Writes aggregating document calledall-docs.adoc
that includes any existing component diagrams and canvases.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 diagramOptions, 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()
.writeModuleCanvases
(Documenter.CanvasOptions canvasOptions) Writes all module canvases using the givenDocumenter.DiagramOptions
.Writes application module metadata to the build folder for inclusion at runtime.Writes the PlantUML component diagram for allApplicationModules
usingDocumenter.DiagramOptions.defaults()
.writeModulesAsPlantUml
(Documenter.DiagramOptions diagramOptions) 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
Deprecated, for removal: This API element is subject to removal in a future version.Creates a newDocumenter
for the givenApplicationModules
and output folder.- Parameters:
modules
- must not be null.outputFolder
- must not be null or empty.
-
Documenter
Creates a newDocumenter
for the givenApplicationModules
and output folder.- Parameters:
modules
- must not be null.options
- must not be null.- Since:
- 1.2
-
-
Method Details
-
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 diagramOptions, 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:
diagramOptions
- must not be null.canvasOptions
- must not be null.- Returns:
- the current instance, will never be null.
-
writeAggregatingDocument
Writes aggregating document calledall-docs.adoc
that includes any existing component diagrams and canvases. usingDocumenter.DiagramOptions.defaults()
andDocumenter.CanvasOptions.defaults()
.- Returns:
- the current instance, will never be null.
- Since:
- 1.2.2
-
writeAggregatingDocument
public Documenter writeAggregatingDocument(Documenter.DiagramOptions diagramOptions, Documenter.CanvasOptions canvasOptions) Writes aggregating document calledall-docs.adoc
that includes any existing component diagrams and canvases.- Parameters:
diagramOptions
- must not be null.canvasOptions
- must not be null.- Returns:
- the current instance, will never be null.
- Since:
- 1.2.2
-
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:
diagramOptions
- 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:
canvasOptions
- must not be null.- Returns:
- the current instance, will never be null.
-
writeModuleMetadata
Writes application module metadata to the build folder for inclusion at runtime.- Returns:
- will never be null.
- Since:
- 1.4
- See Also:
-
toModuleCanvas
-
toModuleCanvas
-
toModuleCanvas
-
getModules
ApplicationModules getModules() -
toPlantUml
String toPlantUml()
-
Documenter(org.springframework.modulith.core.ApplicationModules,org.springframework.modulith.docs.Documenter.Options)
instead.