All Classes and Interfaces

Class
Description
Default base implementation of ClassesTransformer, where only AbstractClassesTransformer.doTransform(JavaClasses) has to be implemented, while description and filtering via AbstractClassesTransformer.that(DescribedPredicate) are provided.
Represents the target of a JavaAccess.
Represents an AccessTarget where the target is a code unit.
Represents an AccessTarget where the target is a code unit.
Represents an AccessTarget where the target is a code unit.
Represents a AccessTarget.CodeUnitCallTarget where the target is a constructor.
Represents a AccessTarget.CodeUnitReferenceTarget where the target is a constructor.
Represents an AccessTarget where the target is a field.
Predefined functions to transform AccessTarget.FieldAccessTarget.
Predefined functions to transform AccessTarget.
Represents a AccessTarget.CodeUnitCallTarget where the target is a method.
Predefined functions to transform AccessTarget.MethodCallTarget.
Represents a AccessTarget.CodeUnitReferenceTarget where the target is a method.
Predefined predicates targeting AccessTarget.
 
Defines which module may depend on which other modules by module name.
Start the definition by following the fluent API through AllowedModuleDependencies.allow().
Extend the definition by calling AllowedModuleDependencies.fromModule(String) multiple times.
 
An ArchModule.Descriptor that carries along a specific Annotation.
 
 
An ArchCondition that derives which objects satisfy/violate the condition from a DescribedPredicate.
Defines how to describe a single ConditionEvent.
A collection of predefined ArchConditions that can be customized or joined together via ArchCondition.and(ArchCondition) and ArchCondition.or(ArchCondition).
Allows access to configured properties in "archunit.properties".
 
Offers convenience to assert typical architectures: Architectures.layeredArchitecture() Architectures.onionArchitecture()
 
Defines which dependencies the layered architecture will consider when checking for violations.
 
Represents a generic "architecture module", i.e.
Contains meta-information for an ArchModule.
A collection of "architectural modules".
An element of the fluent API to create ArchModules
An element of the fluent API to create ArchModules
An element of the fluent API to create ArchModules
A generic interface to be extended by users for providing custom implementations of ArchModule.Descriptor that can carry along more meta-information from the modularized JavaClasses.
Defines which classes belong to the same ArchModule.Identifier and thus will eventually end up in the same ArchModule.
A more convenient ArchModules.DescriptorCreator tailored to the case that we define our modules by root classes.
Predefined predicates that offer syntactic sugar.
Represents a rule about a specified set of objects of interest (e.g.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ArchUnit extensions need to implement this interface.
 
 
Predefined predicates targeting objects that implement CanBeAnnotated
 
 
 
 
 
Allows to join together any existing ArchCondition of this rule with another ArchCondition via and or or.
 
 
 
The central API to import JavaClasses from compiled Java class files.
 
The ClassFileImporter will use the configured ClassResolver, to determine how to resolve further dependencies.

For example, if you import the package com.foo.bar, and some class com.foo.bar.FooBar calls a method of com.other.Dependency, the ClassResolver will decide how this dependency should be treated, i.e.
Provides a way to import a JavaClass from a given URI.
 
A ClassResolver that tries to locate missing dependencies on the classpath.
 
 
 
Calculates architecture metrics as defined by Robert C.
 
 
An event that occurred while checking an ArchCondition.
Handles the data of a ConditionEvent that is the corresponding objects and the description (compare ConditionEvent.handleWith(Handler)).
As an example, this could be a single element of type JavaMethodCall together with a description, like
Collects events that occur when checking ArchConditions.
 
Cycle<EDGE extends Edge<?>>
A cycle formed by the referenced EDGEs.
A generic ArchCondition to check arbitrary COMPONENTs consisting of JavaClasses for cyclic dependencies between those components (induced by the dependencies of the contained classes).
Construct it by following the fluent interface of CycleArchCondition.builder().
 
 
 
 
 
 
Cycles<EDGE extends Edge<?>>
 
Represents a dependency of one Java class on another Java class.
Predefined functions to transform Dependency.
Predefined predicates targeting Dependency.
DependencyRules provides a set of general ArchConditions and ArchRules for checking dependencies between classes.
 
 
 
A predicate holding a description.
Serves the same purpose as ArchModules.DescriptorCreator, but carries along a description to be used by rule syntax elements.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Together with DomainBuilders, this class is the link to create domain objects from the import context.
 
Bundles an ArchRule together with the JavaClasses that were evaluated, and the respective EvaluationResult.
Represents the result of evaluating an ArchRule against some JavaClasses.
Allows to customize violation messages and rule text of ArchRules.
 
 
 
 
 
 
 
 
 
A decorator around an existing ArchRule that "freezes" the state of all violations on the first call instead of failing the test.
GeneralCodingRules provides a set of very general ArchConditions and ArchRules for coding that might be useful in various projects.
 
 
 
 
 
Allows to further filter the set of all objects via GivenConjunction.and(DescribedPredicate) or GivenConjunction.or(DescribedPredicate) or create a complete ArchRule via GivenConjunction.should(ArchCondition).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Predefined predicates targeting objects that implement HasModifiers
 
 
 
Predefined predicates targeting objects that implement HasName.AndFullName
Predefined functions to transform HasName.
Predefined predicates targeting objects that implement HasName
 
A highly context dependent definition of something that has a higher order "owner".
Predefined functions to transform HasOwner.
 
Predefined predicates targeting objects that implement HasOwner
 
 
Predefined predicates targeting objects that implement HasParameterTypes
 
Predefined functions to transform HasReturnType.
Predefined predicates targeting objects that implement HasReturnType
 
 
Predefined predicates targeting objects that implement HasThrowsClause
 
Predefined functions to transform HasType.
Predefined predicates targeting objects that implement HasType
 
 
 
Will be evaluated for every class location, to determine if the class should be imported.

IMPORTANT: For things like caching to work, it's important that the behavior of any implementation is constant, i.e.
 
Best effort ImportOption to omit checking test fixtures defined by the Gradle Test Fixtures Plugin.
NOTE: This excludes all class files residing in some directory ../build/classes/../testFixtures/..
 
Excludes package-info.class files.
Best effort ImportOption to check rules only on main classes.
NOTE: This excludes all class files residing in some directory ../target/test-classes/.., ../build/classes/test/..
Best effort ImportOption to check rules only on test classes.
See ImportOption.DoNotIncludeTests for limitations of test class identification.
 
 
 
Any element annotated with this annotation, is meant for internal use ONLY.
Resolved via PluginLoader
 
Predefined functions to transform JavaAccess.
 
Predefined predicates targeting JavaAccess.
Represents an imported annotation on an annotated object like a class or a method.
Default implementation of JavaAnnotation.ParameterVisitor implementing a no-op behavior, i.e.
A Visitor (compare JavaAnnotation.accept(ParameterVisitor)) offering possibilities to specify behavior when various types of JavaAnnotation.getProperties() are encountered.

The list of declared methods is exhaustive, thus any legal parameter type of an Annotation is represented by the respective visit-method.
 
Predefined predicates targeting JavaCall.
 
Predefined functions to transform JavaClass.
Predefined predicates targeting JavaClass.
 
 
 
Represents a unit of code containing accesses to other units of code.
Predefined functions to transform JavaCodeUnit.
 
Predefined predicates targeting JavaCodeUnit.
 
Predefined predicates targeting JavaCodeUnitAccess.
 
Predefined predicates targeting JavaCodeUnitReference.
 
 
 
 
 
 
 
Predefined predicates targeting JavaFieldAccess.
Represents a generic array type used in signatures of parameterized types.
E.g.
 
Predefined predicates targeting JavaMember.
 
 
 
 
Represents a package of Java classes as defined by the Java Language Specification.
 
Predefined functions to transform JavaPackage.
 
A parameter of a JavaCodeUnit, i.e.
A JavaParameterizedType represents a concrete parameterization of a generic type.
Represents the static initialization block of a class, e.g.
Represents a general Java type.
Predefined functions to transform JavaType.
Represents a type variable used by generic types and members.
E.g.
Represents a wildcard type in a type signature (compare the JLS).
Calculates architecture metrics as defined by John Lakos in his book "Large-Scale C++ Software Design".
To calculate these metrics every component is assigned a "dependsOn" value that represents the number of other components that this component can reach transitively, including itself.
Handles various forms of location from where classes can be imported in a consistent way.
Represents a set of locations of Java class files.
Marks the methods or classes, where resolving types via reflection is allowed.
 
Same as ClassesShouldConjunction but for rules about members.
 
 
 
 
Represents a component of the software system.
A collection of MetricsComponent.
A dependency between two ArchModules.
Used to specify which dependencies should be checked by the respective ArchRule.
 
 
 
 
 
 
 
 
 
 
 
 
 
Matches packages with a syntax similar to AspectJ.
 
 
Allows to evaluate PlantUML Component Diagrams as ArchUnit rules.
Used to specify which dependencies should be checked by the condition.
 
 
 
 
 
 
ProxyRules provides a set of general ArchConditions and ArchRules for checking the usage of proxies.
Marks classes and members that are part of ArchUnit's public API.
 
 
 
Predefined functions to transform ReferencedClassObject.
 
Marks the methods or classes that resolve types via reflection so we can use it for architecture assertions.
Only resolves classes from classpath that are beneath the configured SelectedClassResolverFromClasspath.packageRoots.
 
A collection of JavaClasses modelling some domain aspect of a code basis.
A mapping JavaClass -> SliceIdentifier which defines how to partition a set of JavaClasses into Slices.
 
A unique identifier of a Slice.
 
Basic collection of Slice for tests of dependencies between different domain packages, e.g.
Specifies how to transform a set of JavaClass into a set of Slice, e.g.
Allows to specify ArchRules for "slices" of a code base.
 
 
Contains information about an imported class, i.e.
 
Location in the source code of an ArchUnit domain object.
 
A text file based implementation of a ViolationStore.
This ViolationStore will store the violations of every single FreezingArchRule in a dedicated file.
It will keep an index of all stored rules as well as a mapping to the individual rule violation files in the same folder.
By default, the layout within the configured store folder will look like:
Allows to adjust the rule violation file names of TextFileBasedViolationStore
 
Predefined functions to transform ThrowsClause.
Represents one declared exception of a ThrowsClause.
Predefined functions to transform ThrowsDeclaration.
 
 
 
 
Allows FreezingArchRule to decide when two lines of two violations count as "equivalent".
Provides some sort of storage for violations to FreezingArchRule.
A simple delegate for a ViolationStore to allow adjusting the behavior of another ViolationStore by delegation (e.g.
Calculates visibility metrics as defined by Herbert Dowalil in his book "Modulare Softwarearchitektur: Nachhaltiger Entwurf durch Microservices, Modulithen und SOA 2.0".