Package org.jmolecules.archunit
Class JMoleculesArchitectureRules
java.lang.Object
org.jmolecules.archunit.JMoleculesArchitectureRules
ArchUnit rules to verify architectures defined via JMolecules' annotations.
- Since:
- 0.5
- Author:
- Oliver Drotbohm
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA strategy how to look up stereotypes for the classes to be analyzed.static enumDefines the depth of verification of Hexagonal Architectures, in particular the relationship between adapters and the application core. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.tngtech.archunit.lang.ArchRuleArchUnitArchRulefor Hexagonal Architecture as defined here.static com.tngtech.archunit.lang.ArchRuleArchUnitArchRulefor Hexagonal Architecture as defined here using the givenJMoleculesArchitectureRules.StereotypeLookup.static com.tngtech.archunit.lang.ArchRuleArchUnitArchRulefor Hexagonal Architecture as defined here and a givenJMoleculesArchitectureRules.VerificationDepth.static com.tngtech.archunit.lang.ArchRuleensureHexagonal(JMoleculesArchitectureRules.VerificationDepth depth, JMoleculesArchitectureRules.StereotypeLookup lookup) static com.tngtech.archunit.library.Architectures.LayeredArchitectureArchUnitArchitectures.LayeredArchitecturedefined by considering JMolecules layer annotations allowing access of all layers below.static com.tngtech.archunit.library.Architectures.LayeredArchitectureArchUnitArchitectures.LayeredArchitecturedefined by considering JMolecules layer annotations allowing access of all layers below.static com.tngtech.archunit.library.Architectures.LayeredArchitectureArchUnitArchitectures.LayeredArchitecturedefined by considering JMolecules layer annotations allowing access to the next lower layer only.static com.tngtech.archunit.library.Architectures.LayeredArchitectureArchUnitArchitectures.LayeredArchitecturedefined by considering JMolecules layer annotations allowing access to the next lower layer only.static com.tngtech.archunit.lang.ArchRuleArchUnitArchRuledefining the classic Onion Architecture.static com.tngtech.archunit.lang.ArchRuleArchUnitArchRuledefining the classic Onion Architecture.static com.tngtech.archunit.lang.ArchRuleArchUnitArchRuledefining a simplified variant of the Onion Architecture.static com.tngtech.archunit.lang.ArchRuleArchUnitArchRuledefining a simplified variant of the Onion Architecture.
-
Constructor Details
-
JMoleculesArchitectureRules
public JMoleculesArchitectureRules()
-
-
Method Details
-
ensureLayering
public static com.tngtech.archunit.library.Architectures.LayeredArchitecture ensureLayering()ArchUnitArchitectures.LayeredArchitecturedefined by considering JMolecules layer annotations allowing access of all layers below.- Returns:
- will never be null.
- See Also:
-
InterfaceLayerApplicationLayerDomainLayerInfrastructureLayer
-
ensureLayering
public static com.tngtech.archunit.library.Architectures.LayeredArchitecture ensureLayering(JMoleculesArchitectureRules.StereotypeLookup lookup) ArchUnitArchitectures.LayeredArchitecturedefined 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:
-
InterfaceLayerApplicationLayerDomainLayerInfrastructureLayer
-
ensureLayeringStrict
public static com.tngtech.archunit.library.Architectures.LayeredArchitecture ensureLayeringStrict()ArchUnitArchitectures.LayeredArchitecturedefined by considering JMolecules layer annotations allowing access to the next lower layer only.- Returns:
- will never be null.
- See Also:
-
InterfaceLayerApplicationLayerDomainLayerInfrastructureLayer
-
ensureLayeringStrict
public static com.tngtech.archunit.library.Architectures.LayeredArchitecture ensureLayeringStrict(JMoleculesArchitectureRules.StereotypeLookup lookup) ArchUnitArchitectures.LayeredArchitecturedefined 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:
-
InterfaceLayerApplicationLayerDomainLayerInfrastructureLayer
-
ensureOnionSimple
public static com.tngtech.archunit.lang.ArchRule ensureOnionSimple()ArchUnitArchRuledefining a simplified variant of the Onion Architecture.- Returns:
- will never be null.
- See Also:
-
ApplicationRingDomainRingInfrastructureRing
-
ensureOnionSimple
public static com.tngtech.archunit.lang.ArchRule ensureOnionSimple(JMoleculesArchitectureRules.StereotypeLookup lookup) ArchUnitArchRuledefining a simplified variant of the Onion Architecture.- Parameters:
lookup- must not be null.- Returns:
- will never be null.
- Since:
- 0.22
- See Also:
-
ApplicationRingDomainRingInfrastructureRing
-
ensureOnionClassical
public static com.tngtech.archunit.lang.ArchRule ensureOnionClassical()ArchUnitArchRuledefining the classic Onion Architecture.- Returns:
- will never be null.
- See Also:
-
ApplicationServiceRingDomainServiceRingDomainModelRingInfrastructureRing
-
ensureOnionClassical
public static com.tngtech.archunit.lang.ArchRule ensureOnionClassical(JMoleculesArchitectureRules.StereotypeLookup lookup) ArchUnitArchRuledefining the classic Onion Architecture.- Parameters:
lookup- must not be null.- Returns:
- will never be null.
- Since:
- 0.22
- See Also:
-
ApplicationServiceRingDomainServiceRingDomainModelRingInfrastructureRing
-
ensureHexagonal
public static com.tngtech.archunit.lang.ArchRule ensureHexagonal()ArchUnitArchRulefor Hexagonal Architecture as defined here.- Returns:
- will never be null.
- See Also:
-
ApplicationAdapterPortPrimaryAdapterPrimaryPortSecondaryAdapterSecondaryPort
-
ensureHexagonal
public static com.tngtech.archunit.lang.ArchRule ensureHexagonal(JMoleculesArchitectureRules.VerificationDepth depth) ArchUnitArchRulefor Hexagonal Architecture as defined here and a givenJMoleculesArchitectureRules.VerificationDepth.- Returns:
- will never be null.
- Since:
- 0.25
- See Also:
-
ApplicationAdapterPortPrimaryAdapterPrimaryPortSecondaryAdapterSecondaryPort
-
ensureHexagonal
public static com.tngtech.archunit.lang.ArchRule ensureHexagonal(JMoleculesArchitectureRules.StereotypeLookup lookup) ArchUnitArchRulefor Hexagonal Architecture as defined here using the givenJMoleculesArchitectureRules.StereotypeLookup.- Returns:
- will never be null.
- See Also:
-
ApplicationAdapterPortPrimaryAdapterPrimaryPortSecondaryAdapterSecondaryPort
-
ensureHexagonal
public static com.tngtech.archunit.lang.ArchRule ensureHexagonal(JMoleculesArchitectureRules.VerificationDepth depth, JMoleculesArchitectureRules.StereotypeLookup lookup)
-