assertResideInAPackage

fun List<FileDeclaration>.assertResideInAPackage(vararg packagePatterns: String)

Asserts that all file declarations reside in packages matching any of the specified patterns. Matches using standard Kotlin package wildcard matching (e.g. "..domain..").

Example:

files.assertResideInAPackage("..domain..", "..data..")

Parameters

packagePatterns

The package wildcard patterns. At least one must match.

Throws

if any file does not reside in a matching package.


fun KontureFileScope.assertResideInAPackage(vararg packagePatterns: String)

Asserts that all file declarations in the scope reside in packages matching any of the specified patterns. Matches using standard Kotlin package wildcard matching (e.g. "..domain..").

Parameters

packagePatterns

The package wildcard patterns. At least one must match.

Throws

if any file does not reside in a matching package.


fun List<ClassDeclaration>.assertResideInAPackage(vararg packagePatterns: String)

Asserts that all class declarations reside in packages matching any of the specified patterns. Matches using standard Kotlin package wildcard matching (e.g. "..domain..").

Example:

classes.assertResideInAPackage("..domain..", "..data..")

Parameters

packagePatterns

The package wildcard patterns. At least one must match.

Throws

if any class does not reside in a matching package.


fun KontureScope.assertResideInAPackage(vararg packagePatterns: String)

Asserts that all class declarations in the scope reside in packages matching any of the specified patterns. Matches using standard Kotlin package wildcard matching (e.g. "..domain..").

Parameters

packagePatterns

The package wildcard patterns. At least one must match.

Throws

if any class does not reside in a matching package.