ClassesThat

Fluent API for defining filtering conditions on Kotlin classes.

Functions

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

Matches if all of the nested condition blocks are satisfied.

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

Matches if any of the nested condition blocks are satisfied.

Link copied to clipboard

Restricts the rules to abstract classes only.

Link copied to clipboard

Restricts the rules to classes extending or implementing the specified type.

Link copied to clipboard

Restricts the rules to classes extending or implementing all of the specified supertypes.

Restricts the rules to classes extending or implementing the specified supertype.

Link copied to clipboard

Restricts the rules to classes extending or implementing any of the specified supertypes.

Restricts the rules to classes extending or implementing the specified supertype.

Link copied to clipboard

Restricts the rules to enum classes only.

Link copied to clipboard

Restricts the rules to interface definitions only.

Link copied to clipboard
Link copied to clipboard

Restricts the rules to classes that are documented with a KDoc comment.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Restricts the rules to classes annotated with all of the specified annotations. Matches either simple names or FQNs.

Restricts the rules to classes annotated with the specified annotation. Matches either simple names or FQNs.

Link copied to clipboard

Restricts the rules to classes containing specified modifier.

Restricts the rules to classes containing all of the specified modifiers.

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

Restricts the rules to classes annotated with the specified annotation. Matches either the annotation's simple name or its FQN.

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

Restricts the rules to classes with specified annotation having a matching argument name and value.

Link copied to clipboard

Restricts the rules to classes annotated with any of the specified annotations. Matches either simple names or FQNs.

Restricts the rules to classes annotated with the specified annotation. Matches either simple names or FQNs.

Link copied to clipboard

Restricts the rules to classes containing specified modifier.

Restricts the rules to classes containing any of the specified modifiers.

Link copied to clipboard

Restricts the rules to classes with the specified visibility.

Restricts the rules to classes with any of the specified visibilities.

Link copied to clipboard

Restricts the rules to classes containing specified modifier.

Link copied to clipboard
infix fun haveName(predicate: (String) -> Boolean): ClassesRuleBuilder
fun haveName(description: String, predicate: (String) -> Boolean): ClassesRuleBuilder

Restricts the rules to classes whose simple names match the specified predicate.

Link copied to clipboard

Restricts the rules to classes whose simple names end with any of the specified suffixes.

Restricts the rules to classes whose simple names end with the specified suffix.

Link copied to clipboard

Restricts the rules to classes whose simple names match any of the specified glob patterns. Supports '*' wildcards.

Restricts the rules to classes whose simple names match the specified glob pattern. Supports '*' wildcards.

Link copied to clipboard

Restricts the rules to classes whose simple names start with any of the specified prefixes.

Restricts the rules to classes whose simple names start with the specified prefix.

Link copied to clipboard

Restricts the rules to classes with specified visibility.

Link copied to clipboard

Restricts the rules to classes matching the specified predicate.

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

Matches if none of the nested condition blocks are satisfied.

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

Restricts the rules to classes residing in packages matching any of the specified patterns. Supports .. segment wildcards.

Restricts the rules to classes residing in packages matching the specified predicate.

infix fun resideInAPackage(packagePattern: String): ClassesRuleBuilder

Restricts the rules to classes residing in packages matching the specified pattern. Supports .. segment wildcards (e.g., io.github.baole.konture..).

infix fun resideInAPackage(packagePatterns: List<String>): ClassesRuleBuilder

Restricts the rules to classes residing in packages matching any of the specified patterns. Supports .. segment wildcards (e.g., io.github.baole.konture..).

Link copied to clipboard

Satisfies an arbitrary custom predicate logic.