Interface ModulithMetadata

All Known Implementing Classes:
AnnotationModulithMetadata, SpringBootModulithMetadata

public interface ModulithMetadata
Core metadata about the modulithic application.
Author:
Oliver Drotbohm
  • Field Details

  • Method Details

    • of

      static ModulithMetadata of(Class<?> annotated)
      Creates a new ModulithMetadata for the given annotated type. Expects the type either be annotated with Modulith, Modulithic or SpringBootApplication.
      Parameters:
      annotated - must not be null.
      Returns:
      will never be null.
      Throws:
      IllegalArgumentException - in case none of the above mentioned annotations is present on the given type.
    • of

      static ModulithMetadata of(String javaPackage)
      Creates a new ModulithMetadata instance for the given package. Inspects the package for classes annotated with Modulithic to pick up additional configuration.
      Parameters:
      javaPackage - must not be null or empty.
      Returns:
      will never be null.
    • getSource

      Object getSource()
      Returns the source of the Spring Modulith setup. Either a type or a package.
      Returns:
      will never be null.
    • useFullyQualifiedModuleNames

      boolean useFullyQualifiedModuleNames()
      Whether to use fully-qualified module names, i.e. rather use the fully-qualified package name instead of the local one.
      Returns:
    • getSharedModuleIdentifiers

      Stream<ApplicationModuleIdentifier> getSharedModuleIdentifiers()
      Returns the ApplicationModuleIdentifiers of shared modules, i.e. modules that are supposed to always be included in bootstraps.
      Returns:
      will never be null.
      Since:
      1.3
    • getSystemName

      Optional<String> getSystemName()
      Returns the name of the system.
      Returns:
      will never be null.
    • getBasePackages

      List<String> getBasePackages()
      Returns all base packages of the modulith.
      Returns:
      will never be null.
      Since:
      1.2