Class Documenter
java.lang.Object
org.springframework.modulith.docs.Documenter
API to create documentation for
ApplicationModules.- Author:
- Oliver Drotbohm
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classOptions to tweak the rendering of diagrams. -
Constructor Summary
ConstructorsConstructorDescriptionDocumenter(Class<?> modulithType) Creates a newDocumenterfor theApplicationModulescreated for the given modulith type in the default output folder (spring-modulith-docs).Documenter(ApplicationModules modules) Creates a newDocumenterfor the givenApplicationModulesinstance in the default output folder (spring-modulith-docs).Documenter(ApplicationModules modules, String outputFolder) Creates a newDocumenterfor the givenApplicationModulesand output folder. -
Method Summary
Modifier and TypeMethodDescription(package private) ApplicationModules(package private) StringtoModuleCanvas(ApplicationModule module) (package private) StringtoModuleCanvas(ApplicationModule module, String apiBase) (package private) StringtoModuleCanvas(ApplicationModule module, Documenter.CanvasOptions options) (package private) StringwithOutputFolder(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 givenApplicationModulewith 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 allApplicationModulesusingDocumenter.DiagramOptions.defaults().Writes the PlantUML component diagram for allApplicationModuleswith the givenDocumenter.DiagramOptions.
-
Constructor Details
-
Documenter
Creates a newDocumenterfor theApplicationModulescreated for the given modulith type in the default output folder (spring-modulith-docs).- Parameters:
modulithType- must not be null.
-
Documenter
Creates a newDocumenterfor the givenApplicationModulesinstance in the default output folder (spring-modulith-docs).- Parameters:
modules- must not be null.
-
Documenter
Creates a newDocumenterfor the givenApplicationModulesand 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 allApplicationModulesusingDocumenter.DiagramOptions.defaults().- Returns:
- the current instance, will never be null.
-
writeModulesAsPlantUml
Writes the PlantUML component diagram for allApplicationModuleswith 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 givenApplicationModulewith 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.