Properties

Link copied to clipboard
open override val builder: ClassesRuleBuilder

Filter or assertion criteria for builder.

Functions

Link copied to clipboard

Asserts that all member functions in selected classes satisfy the assertions specified in the block.

Link copied to clipboard
open fun allOf(vararg blocks: ClassesShould.() -> Unit): ClassesRuleBuilder

Asserts that all of the nested assertion blocks are satisfied.

Link copied to clipboard

Asserts that all member properties in selected classes satisfy the assertions specified in the block.

Link copied to clipboard
open infix fun annotatedWith(annotationFqName: String): ClassesRuleBuilder

Asserts that selected classes are annotated with the specified annotation. Matches either the annotation's simple name or its FQN.

Link copied to clipboard

Asserts that classes have annotation type parameter T.

Asserts that classes have the specified annotation class.

Link copied to clipboard

Asserts that selected classes are annotated with all of the specified annotations.

Asserts that selected classes are annotated with the specified annotation. Matches either simple names or FQNs.

Link copied to clipboard

Asserts that classes have all of the specified annotations.

Link copied to clipboard

Asserts that selected classes are annotated with any of the specified annotations.

Asserts that selected classes are annotated with the specified annotation. Matches either simple names or FQNs.

Link copied to clipboard

Asserts that classes have any of the specified annotations.

Link copied to clipboard
open fun anyOf(vararg blocks: ClassesShould.() -> Unit): ClassesRuleBuilder

Asserts that at least one of the nested assertion blocks is satisfied.

Link copied to clipboard

Asserts that selected classes are abstract classes.

Link copied to clipboard
open infix fun beAssignableFrom(subType: String): ClassesRuleBuilder

Asserts that selected classes are assignable from the specified subtype.

Link copied to clipboard

Asserts that classes are assignable from type parameter T.

Asserts that classes are assignable from the specified subType.

Link copied to clipboard
open infix fun beAssignableTo(superType: String): ClassesRuleBuilder

Asserts that selected classes extend or implement specified supertype.

Link copied to clipboard

Asserts that classes are assignable to type parameter T.

Asserts that classes are assignable to the specified superType.

Link copied to clipboard
open fun beAssignableToAllOf(vararg superTypes: String): ClassesRuleBuilder
open infix fun beAssignableToAllOf(superTypes: List<String>): ClassesRuleBuilder

Asserts that selected classes are assignable to all of the specified supertypes.

open infix fun beAssignableToAllOf(superType: String): ClassesRuleBuilder

Asserts that selected classes are assignable to specified supertype.

Link copied to clipboard

Asserts that classes are assignable to all of the specified superTypes.

Link copied to clipboard
open fun beAssignableToAnyOf(vararg superTypes: String): ClassesRuleBuilder
open infix fun beAssignableToAnyOf(superTypes: List<String>): ClassesRuleBuilder

Asserts that selected classes are assignable to any of the specified supertypes.

open infix fun beAssignableToAnyOf(superType: String): ClassesRuleBuilder

Asserts that selected classes are assignable to specified supertype.

Link copied to clipboard

Asserts that classes are assignable to any of the specified superTypes.

Link copied to clipboard

Asserts that selected classes are data classes.

Link copied to clipboard

Asserts that selected classes have KDoc documentation.

Link copied to clipboard

Asserts that selected classes are enum classes.

Link copied to clipboard

Asserts that selected classes are free of dependency cycles.

Link copied to clipboard

Asserts that selected classes are inline/value classes.

Link copied to clipboard

Asserts that selected classes are inner classes.

Link copied to clipboard

Asserts that selected classes are interface definitions.

Link copied to clipboard

Filter or assertion criteria for be internal.

Link copied to clipboard

Asserts that selected classes are nested classes.

Link copied to clipboard

Asserts that selected classes are open classes.

Link copied to clipboard

Filter or assertion criteria for be private.

Link copied to clipboard

Filter or assertion criteria for be protected.

Link copied to clipboard

Filter or assertion criteria for be public.

Link copied to clipboard

Asserts that selected classes are sealed.

Link copied to clipboard

Asserts that selected classes are top-level classes.

Link copied to clipboard
open fun containFunction(vararg functionNames: String): ClassesRuleBuilder
open infix fun containFunction(functionName: String): ClassesRuleBuilder
open infix fun containFunction(functionNames: List<String>): ClassesRuleBuilder

Filter or assertion criteria for contain function.

Link copied to clipboard
open fun containFunctions(vararg functionNames: String): ClassesRuleBuilder
open infix fun containFunctions(functionNames: List<String>): ClassesRuleBuilder

Filter or assertion criteria for contain functions.

Link copied to clipboard
open fun containProperties(vararg propertyNames: String): ClassesRuleBuilder
open infix fun containProperties(propertyNames: List<String>): ClassesRuleBuilder

Filter or assertion criteria for contain properties.

Link copied to clipboard
open fun containProperty(vararg propertyNames: String): ClassesRuleBuilder
open infix fun containProperty(propertyName: String): ClassesRuleBuilder
open infix fun containProperty(propertyNames: List<String>): ClassesRuleBuilder

Filter or assertion criteria for contain property.

Link copied to clipboard
open infix fun haveAllModifiers(modifier: Modifier): ClassesRuleBuilder

Asserts that selected classes have the specified modifier.

open fun haveAllModifiers(vararg modifiers: Modifier): ClassesRuleBuilder
open infix fun haveAllModifiers(modifiers: List<Modifier>): ClassesRuleBuilder

Asserts that selected classes have all of the specified modifiers.

Link copied to clipboard
open fun haveAnnotationWithArgument(annotationName: String, argName: String?, argValue: String): ClassesRuleBuilder

Asserts that selected classes have the specified annotation with a matching argument name and value.

Link copied to clipboard

Asserts that classes have an annotation annotation with argument argName equal to argValue.

Link copied to clipboard
open infix fun haveAnyModifier(modifier: Modifier): ClassesRuleBuilder

Asserts that selected classes have the specified modifier.

open fun haveAnyModifier(vararg modifiers: Modifier): ClassesRuleBuilder
open infix fun haveAnyModifier(modifiers: List<Modifier>): ClassesRuleBuilder

Asserts that selected classes have at least one of the specified modifiers.

Link copied to clipboard
open infix fun haveAnyVisibility(visibility: Visibility): ClassesRuleBuilder

Asserts that selected classes have specified visibility.

open fun haveAnyVisibility(vararg visibilities: Visibility): ClassesRuleBuilder
open infix fun haveAnyVisibility(visibilities: List<Visibility>): ClassesRuleBuilder

Asserts that selected classes have any of the specified visibilities.

Link copied to clipboard
open infix fun haveModifier(modifier: Modifier): ClassesRuleBuilder

Asserts that selected classes have specified modifier.

Link copied to clipboard
open infix fun haveVisibility(visibility: Visibility): ClassesRuleBuilder

Asserts that selected classes have specified visibility.

Link copied to clipboard
open fun inModule(vararg modulePaths: String): ClassesRuleBuilder
open infix fun inModule(modulePaths: List<String>): ClassesRuleBuilder

Asserts that selected classes reside in any module matching the specified paths.

open infix fun inModule(modulePath: String): ClassesRuleBuilder

Asserts that selected classes reside in a module matching the specified path.

Link copied to clipboard
open fun inModules(vararg modulePaths: String): ClassesRuleBuilder
open infix fun inModules(modulePaths: List<String>): ClassesRuleBuilder

Asserts that selected classes reside in any module matching the specified paths.

Link copied to clipboard
open fun inPackage(vararg packagePatterns: String): ClassesRuleBuilder
open infix fun inPackage(packagePatterns: List<String>): ClassesRuleBuilder

Asserts that selected classes reside in packages matching any of the specified patterns. Supports .. segment wildcards.

open infix fun inPackage(predicate: (String) -> Boolean): ClassesRuleBuilder
open fun inPackage(description: String, predicate: (String) -> Boolean): ClassesRuleBuilder

Asserts that selected classes reside in packages matching the specified predicate.

open infix fun inPackage(packagePattern: String): ClassesRuleBuilder

Asserts that selected classes reside in packages matching the specified pattern. Supports .. segment wildcards.

Link copied to clipboard
open infix fun inPackageOf(type: KClass<*>): ClassesRuleBuilder

Asserts that selected classes reside in the package of the specified type.

Link copied to clipboard

Asserts that classes reside in the package of type parameter T.

Asserts that classes reside in the package of type.

Link copied to clipboard
open fun named(vararg names: String): ClassesRuleBuilder
open infix fun named(name: String): ClassesRuleBuilder
open infix fun named(names: List<String>): ClassesRuleBuilder

Filter or assertion criteria for named.

open infix fun named(predicate: (String) -> Boolean): ClassesRuleBuilder
open fun named(description: String, predicate: (String) -> Boolean): ClassesRuleBuilder

Asserts that selected classes have simple names matching the specified predicate.

Link copied to clipboard
open fun nameEndsWith(vararg suffixes: String): ClassesRuleBuilder
open infix fun nameEndsWith(suffixes: List<String>): ClassesRuleBuilder

Asserts that selected classes have simple names ending with any of the specified suffixes.

open infix fun nameEndsWith(suffix: String): ClassesRuleBuilder

Asserts that selected classes have simple names ending with the specified suffix.

Link copied to clipboard
open fun nameMatches(vararg patterns: String): ClassesRuleBuilder
open infix fun nameMatches(patterns: List<String>): ClassesRuleBuilder

Asserts that selected classes have simple names matching any of the specified glob patterns. Supports '*' wildcards.

open infix fun nameMatches(pattern: String): ClassesRuleBuilder

Asserts that selected classes have simple names matching the specified glob pattern. Supports '*' wildcards.

Link copied to clipboard
open fun nameStartsWith(vararg prefixes: String): ClassesRuleBuilder
open infix fun nameStartsWith(prefixes: List<String>): ClassesRuleBuilder

Asserts that selected classes have simple names starting with any of the specified prefixes.

open infix fun nameStartsWith(prefix: String): ClassesRuleBuilder

Asserts that selected classes have simple names starting with the specified prefix.

Link copied to clipboard
open fun noneOf(vararg blocks: ClassesShould.() -> Unit): ClassesRuleBuilder

Asserts that none of the nested assertion blocks are satisfied.

Link copied to clipboard

Filter or assertion criteria for not be abstract.

Link copied to clipboard
open fun notBeAccessedByAnyPackage(vararg packagePatterns: String): ClassesRuleBuilder
open infix fun notBeAccessedByAnyPackage(packagePatterns: List<String>): ClassesRuleBuilder

Asserts that selected classes are not accessed by any class residing in packages matching the specified patterns.

open infix fun notBeAccessedByAnyPackage(packagePattern: String): ClassesRuleBuilder

Asserts that selected classes are not accessed by any class residing in packages matching the specified pattern.

Link copied to clipboard

Filter or assertion criteria for not be data.

Link copied to clipboard

Filter or assertion criteria for not be inline.

Link copied to clipboard

Filter or assertion criteria for not be inner.

Link copied to clipboard

Filter or assertion criteria for not be interface.

Link copied to clipboard

Filter or assertion criteria for not be open.

Link copied to clipboard

Filter or assertion criteria for not be sealed.

Link copied to clipboard
open fun notCall(fqName: String): ClassesRuleBuilder

Fails for every invocation of fqName in the selected class.

open fun notCall(kClass: KClass<*>): ClassesRuleBuilder

Fails for every invocation of kClass in the selected class.

Link copied to clipboard

Fails for every invocation of type T in the selected class.

Link copied to clipboard

Asserts that selected classes do not contain dependency cycles. Alias for beFreeOfCycles.

Link copied to clipboard
open fun notContainFunction(vararg functionNames: String): ClassesRuleBuilder
open infix fun notContainFunction(functionName: String): ClassesRuleBuilder
open infix fun notContainFunction(functionNames: List<String>): ClassesRuleBuilder

Filter or assertion criteria for not contain function.

Link copied to clipboard
open fun notContainFunctions(vararg functionNames: String): ClassesRuleBuilder
open infix fun notContainFunctions(functionNames: List<String>): ClassesRuleBuilder

Filter or assertion criteria for not contain functions.

Link copied to clipboard
open fun notContainProperties(vararg propertyNames: String): ClassesRuleBuilder
open infix fun notContainProperties(propertyNames: List<String>): ClassesRuleBuilder

Filter or assertion criteria for not contain properties.

Link copied to clipboard
open fun notContainProperty(vararg propertyNames: String): ClassesRuleBuilder
open infix fun notContainProperty(propertyName: String): ClassesRuleBuilder
open infix fun notContainProperty(propertyNames: List<String>): ClassesRuleBuilder

Filter or assertion criteria for not contain property.

Link copied to clipboard

Asserts that classes do not depend on class type parameter T.

Link copied to clipboard
open fun notDependOnClasses(vararg classes: KClass<*>): ClassesRuleBuilder

Asserts that selected classes do not depend on the specified classes.

Link copied to clipboard
open fun notDependOnClassesInAnyPackage(vararg packagePatterns: String): ClassesRuleBuilder

Asserts that selected classes do not depend on classes residing in packages matching the specified patterns.

Asserts that selected classes do not depend on classes residing in packages matching the specified pattern.

Link copied to clipboard
open fun notDependOnPackages(vararg packagePatterns: String): ClassesRuleBuilder
open infix fun notDependOnPackages(packagePatterns: List<String>): ClassesRuleBuilder

Asserts that selected classes do not depend on packages matching packagePatterns.

open infix fun notDependOnPackages(packagePattern: String): ClassesRuleBuilder

Asserts that selected classes do not depend on packages matching packagePattern.

Link copied to clipboard
open infix fun notHaveModifier(modifier: Modifier): ClassesRuleBuilder

Filter or assertion criteria for not have modifier.

Link copied to clipboard

Asserts that selected classes do not expose types annotated with the specified annotations in their property, function return, or parameter signatures.

Asserts that selected classes do not expose types annotated with the specified annotation in their property, function return, or parameter signatures.

Asserts that selected classes do not expose types annotated with any of the specified annotations in their property, function return, or parameter signatures.

Link copied to clipboard
open fun notInModule(vararg modulePaths: String): ClassesRuleBuilder
open infix fun notInModule(modulePaths: List<String>): ClassesRuleBuilder

Asserts that selected classes do not reside in any module matching the specified paths.

open infix fun notInModule(modulePath: String): ClassesRuleBuilder

Asserts that selected classes do not reside in a module matching the specified path.

Link copied to clipboard
open fun notInModules(vararg modulePaths: String): ClassesRuleBuilder
open infix fun notInModules(modulePaths: List<String>): ClassesRuleBuilder

Asserts that selected classes do not reside in any module matching the specified paths.

Link copied to clipboard
open fun notInPackage(vararg packagePatterns: String): ClassesRuleBuilder
open infix fun notInPackage(packagePatterns: List<String>): ClassesRuleBuilder

Asserts that selected classes do not reside in packages matching any of the specified patterns. Supports .. segment wildcards.

open infix fun notInPackage(packagePattern: String): ClassesRuleBuilder

Asserts that selected classes do not reside in packages matching the specified pattern. Supports .. segment wildcards.

Link copied to clipboard
open fun notNamed(vararg names: String): ClassesRuleBuilder
open infix fun notNamed(name: String): ClassesRuleBuilder
open infix fun notNamed(names: List<String>): ClassesRuleBuilder

Filter or assertion criteria for not named.

Link copied to clipboard
open fun notNameEndsWith(vararg suffixes: String): ClassesRuleBuilder
open infix fun notNameEndsWith(suffix: String): ClassesRuleBuilder
open infix fun notNameEndsWith(suffixes: List<String>): ClassesRuleBuilder

Filter or assertion criteria for not name ends with.

Link copied to clipboard
open fun notNameMatches(vararg patterns: String): ClassesRuleBuilder
open infix fun notNameMatches(pattern: String): ClassesRuleBuilder
open infix fun notNameMatches(patterns: List<String>): ClassesRuleBuilder

Filter or assertion criteria for not name matches.

Link copied to clipboard
open fun notNameStartsWith(vararg prefixes: String): ClassesRuleBuilder
open infix fun notNameStartsWith(prefixes: List<String>): ClassesRuleBuilder

Filter or assertion criteria for not name starts with.

Link copied to clipboard

Fails for every actual class/type use of fqName in the selected class; imports alone do not match.

Fails for every actual class/type use of kClass in the selected class; imports alone do not match.

Link copied to clipboard

Fails for every actual class/type use of type T in the selected class; imports alone do not match.

Link copied to clipboard
open fun onlyBeAccessedByAnyPackage(vararg packagePatterns: String): ClassesRuleBuilder
open infix fun onlyBeAccessedByAnyPackage(packagePatterns: List<String>): ClassesRuleBuilder

Asserts that selected classes are accessed only by classes residing in packages matching the specified patterns.

open infix fun onlyBeAccessedByAnyPackage(packagePattern: String): ClassesRuleBuilder

Asserts that selected classes are accessed only by classes residing in packages matching the specified pattern.

Link copied to clipboard
open fun onlyDependOnClassesInAnyPackage(vararg packagePatterns: String): ClassesRuleBuilder

Asserts that selected classes depend only on classes residing in packages matching the specified patterns.

Asserts that selected classes depend only on classes residing in packages matching the specified pattern.

Link copied to clipboard
open fun onlyDependOnPackages(vararg packagePatterns: String): ClassesRuleBuilder
open infix fun onlyDependOnPackages(packagePatterns: List<String>): ClassesRuleBuilder

Asserts that selected classes only depend on packages matching packagePatterns.

open infix fun onlyDependOnPackages(packagePattern: String): ClassesRuleBuilder

Asserts that selected classes only depend on packages matching packagePattern.

Link copied to clipboard
open infix fun satisfy(assertion: (ClassDeclaration) -> Boolean): ClassesRuleBuilder

Asserts that selected classes satisfy custom assertion assertion.

Satisfies an arbitrary custom assertion logic with custom violations builder.

open infix fun satisfy(description: String): ClassesRuleBuilder

Asserts that selected classes satisfy custom description description.

open fun satisfy(description: String, predicate: (ClassDeclaration) -> Boolean): ClassesRuleBuilder

Asserts that selected classes satisfy custom predicate predicate with description.

open fun satisfy(id: String, description: String? = null, predicate: SatisfyContext<ClassDeclaration>.(ClassDeclaration) -> Boolean): ClassesRuleBuilder

Asserts that selected classes satisfy a custom predicate within a SatisfyContext block identified by id and optional description.

Link copied to clipboard
open infix fun simpleNamed(name: String): ClassesRuleBuilder

Filter or assertion criteria for simple named.