@Slf4j @CompileStatic class ArchUnitUtils extends Object
Collection of utilities that simplify some aspects of working with ArchUnit.
Constructor and description |
---|
ArchUnitUtils() |
Type Params | Return Type | Name and description |
---|---|---|
|
static com.tngtech.archunit.core.domain.JavaClasses |
importJavaClassesFromPackages(Collection<String> packagesToImport, Collection<String> packagesToExclude, Collection<com.tngtech.archunit.core.importer.ImportOption> importOptions) Imports ArchUnit's JavaClasses while allowing specifying packages that should be excluded from the import.
|
Imports ArchUnit's JavaClasses
while allowing specifying packages that should be excluded from the import.
JavaClasses importedClasses= ArchUnitUtils.importJavaClassesFromPackages( ["org.klokwrk.cargotracking.booking.app.commandside", "org.klokwrk.cargotracking.domain.model.value", "org.klokwrk.cargotracking.booking.app.commandside.feature"], ["org.klokwrk.cargotracking.booking.app.commandside.test"] )
packagesToImport
- Collection of package names to be imported. Each collection's string is exact package name without any special characters like ..
or *
.packagesToExclude
- Collection of package names to be excluded from the import. Each collection's string is exact package name without any special characters like ..
or
*
.importOptions
- Collection of additional ArchUnit's ImportOption
options. By default it contains an instance of ImportOption.DoNotIncludeTests
.JavaClasses
.