Class JMoleculesArchitectureRules

java.lang.Object
org.jmolecules.archunit.JMoleculesArchitectureRules

public class JMoleculesArchitectureRules extends Object
ArchUnit rules to verify architectures defined via JMolecules' annotations.
Since:
0.5
Author:
Oliver Drotbohm
  • Constructor Details

    • JMoleculesArchitectureRules

      public JMoleculesArchitectureRules()
  • Method Details

    • ensureLayering

      public static com.tngtech.archunit.library.Architectures.LayeredArchitecture ensureLayering()
      ArchUnit Architectures.LayeredArchitecture defined by considering JMolecules layer annotations allowing access of all layers below.
      Returns:
      will never be null.
      See Also:
      • InterfaceLayer
      • ApplicationLayer
      • DomainLayer
      • InfrastructureLayer
    • ensureLayering

      public static com.tngtech.archunit.library.Architectures.LayeredArchitecture ensureLayering(JMoleculesArchitectureRules.StereotypeLookup lookup)
      ArchUnit Architectures.LayeredArchitecture defined by considering JMolecules layer annotations allowing access of all layers below.
      Parameters:
      lookup - must not be null.
      Returns:
      will never be null.
      Since:
      0.22
      See Also:
      • InterfaceLayer
      • ApplicationLayer
      • DomainLayer
      • InfrastructureLayer
    • ensureLayeringStrict

      public static com.tngtech.archunit.library.Architectures.LayeredArchitecture ensureLayeringStrict()
      ArchUnit Architectures.LayeredArchitecture defined by considering JMolecules layer annotations allowing access to the next lower layer only.
      Returns:
      will never be null.
      See Also:
      • InterfaceLayer
      • ApplicationLayer
      • DomainLayer
      • InfrastructureLayer
    • ensureLayeringStrict

      public static com.tngtech.archunit.library.Architectures.LayeredArchitecture ensureLayeringStrict(JMoleculesArchitectureRules.StereotypeLookup lookup)
      ArchUnit Architectures.LayeredArchitecture defined by considering JMolecules layer annotations allowing access to the next lower layer only.
      Parameters:
      lookup - must not be null.
      Returns:
      will never be null.
      Since:
      0.22
      See Also:
      • InterfaceLayer
      • ApplicationLayer
      • DomainLayer
      • InfrastructureLayer
    • ensureOnionSimple

      public static com.tngtech.archunit.lang.ArchRule ensureOnionSimple()
      ArchUnit ArchRule defining a simplified variant of the Onion Architecture.
      Returns:
      will never be null.
      See Also:
      • ApplicationRing
      • DomainRing
      • InfrastructureRing
    • ensureOnionSimple

      public static com.tngtech.archunit.lang.ArchRule ensureOnionSimple(JMoleculesArchitectureRules.StereotypeLookup lookup)
      ArchUnit ArchRule defining a simplified variant of the Onion Architecture.
      Parameters:
      lookup - must not be null.
      Returns:
      will never be null.
      Since:
      0.22
      See Also:
      • ApplicationRing
      • DomainRing
      • InfrastructureRing
    • ensureOnionClassical

      public static com.tngtech.archunit.lang.ArchRule ensureOnionClassical()
      ArchUnit ArchRule defining the classic Onion Architecture.
      Returns:
      will never be null.
      See Also:
      • ApplicationServiceRing
      • DomainServiceRing
      • DomainModelRing
      • InfrastructureRing
    • ensureOnionClassical

      public static com.tngtech.archunit.lang.ArchRule ensureOnionClassical(JMoleculesArchitectureRules.StereotypeLookup lookup)
      ArchUnit ArchRule defining the classic Onion Architecture.
      Parameters:
      lookup - must not be null.
      Returns:
      will never be null.
      Since:
      0.22
      See Also:
      • ApplicationServiceRing
      • DomainServiceRing
      • DomainModelRing
      • InfrastructureRing
    • ensureHexagonal

      public static com.tngtech.archunit.lang.ArchRule ensureHexagonal()
      ArchUnit ArchRule for Hexagonal Architecture as defined here.
      Returns:
      will never be null.
      See Also:
      • Application
      • Adapter
      • Port
      • PrimaryAdapter
      • PrimaryPort
      • SecondaryAdapter
      • SecondaryPort
    • ensureHexagonal

      public static com.tngtech.archunit.lang.ArchRule ensureHexagonal(JMoleculesArchitectureRules.VerificationDepth depth)
      ArchUnit ArchRule for Hexagonal Architecture as defined here and a given JMoleculesArchitectureRules.VerificationDepth.
      Returns:
      will never be null.
      Since:
      0.25
      See Also:
      • Application
      • Adapter
      • Port
      • PrimaryAdapter
      • PrimaryPort
      • SecondaryAdapter
      • SecondaryPort
    • ensureHexagonal

      public static com.tngtech.archunit.lang.ArchRule ensureHexagonal(JMoleculesArchitectureRules.StereotypeLookup lookup)
      ArchUnit ArchRule for Hexagonal Architecture as defined here using the given JMoleculesArchitectureRules.StereotypeLookup.
      Returns:
      will never be null.
      See Also:
      • Application
      • Adapter
      • Port
      • PrimaryAdapter
      • PrimaryPort
      • SecondaryAdapter
      • SecondaryPort
    • ensureHexagonal

      public static com.tngtech.archunit.lang.ArchRule ensureHexagonal(JMoleculesArchitectureRules.VerificationDepth depth, JMoleculesArchitectureRules.StereotypeLookup lookup)