Enum Class DependencyType

java.lang.Object
java.lang.Enum<DependencyType>
org.springframework.modulith.core.DependencyType
All Implemented Interfaces:
Serializable, Comparable<DependencyType>, Constable

public enum DependencyType extends Enum<DependencyType>
The type of dependency between ApplicationModules.
Author:
Oliver Drotbohm
  • Enum Constant Details

    • USES_COMPONENT

      public static final DependencyType USES_COMPONENT
      Indicates that the module depends on the other one by a component dependency, i.e. that other module needs to be bootstrapped to run the source module.
    • ENTITY

      public static final DependencyType ENTITY
      Indicates that the module refers to an entity of the other.
    • EVENT_LISTENER

      public static final DependencyType EVENT_LISTENER
      Indicates that the module depends on the other by declaring an event listener for an event exposed by the other module. Thus, the target module does not have to be bootstrapped to run the source one.
    • DEFAULT

      public static final DependencyType DEFAULT
  • Method Details

    • values

      public static DependencyType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DependencyType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • defaultOr

      DependencyType defaultOr(com.tngtech.archunit.thirdparty.com.google.common.base.Supplier<DependencyType> supplier)
      Returns the current DependencyType or obtains the one provided by the given supplier if the current one is DEFAULT.
      Parameters:
      supplier - must not be null.
      Returns:
    • forParameter

      static DependencyType forParameter(com.tngtech.archunit.core.domain.JavaClass type)
    • forCodeUnit

      static DependencyType forCodeUnit(com.tngtech.archunit.core.domain.JavaCodeUnit codeUnit)
    • forDependency

      static DependencyType forDependency(com.tngtech.archunit.core.domain.Dependency dependency)
    • format

      public abstract String format(FormatableType source, FormatableType target)
    • allBut

      public static Stream<DependencyType> allBut(Collection<DependencyType> types)
      Returns all DependencyTypes except the given ones.
      Parameters:
      types - must not be null.
      Returns:
    • allBut

      public static Stream<DependencyType> allBut(Stream<DependencyType> types)
    • allBut

      public static Stream<DependencyType> allBut(DependencyType... types)
      Returns all DependencyTypes except the given ones.
      Parameters:
      types - must not be null.
      Returns: