Class SpringModulithDocumentationSource

java.lang.Object
org.springframework.modulith.docs.SpringModulithDocumentationSource
All Implemented Interfaces:
DocumentationSource

class SpringModulithDocumentationSource extends Object implements DocumentationSource
A DocumentationSource using metadata found in "generated-spring-modulith/javadoc.json", usually generated via spring-modulith-apt.
Since:
1.3
Author:
Oliver Drotbohm
  • Method Details

    • getInstance

      public static Optional<DocumentationSource> getInstance()
      Creates a new DocumentationSource if the backing metadata file (in "generated-spring-modulith/javadoc.json") is present.
      Returns:
      will never be null.
    • getMetadataLocation

      public static String getMetadataLocation()
      Returns the location of the metadata file.
      Returns:
      will never be null.
    • getDocumentation

      public Optional<String> getDocumentation(com.tngtech.archunit.core.domain.JavaClass type)
      Description copied from interface: DocumentationSource
      Returns the documentation to be used for the given JavaClass.
      Specified by:
      getDocumentation in interface DocumentationSource
      Parameters:
      type - must not be null.
      Returns:
      will never be null.
    • getDocumentation

      public Optional<String> getDocumentation(com.tngtech.archunit.core.domain.JavaMethod method)
      Description copied from interface: DocumentationSource
      Returns the documentation to be used for the given JavaMethod.
      Specified by:
      getDocumentation in interface DocumentationSource
      Parameters:
      method - must not be null.
      Returns:
      will never be null.