classes

abstract val classes: SetProperty<String>

Filter by a class name.

The name filter compares the qualified class name with the value in the filter:

filters {
excluded {
classes.add("foo.Bar") // name filter, excludes class with name `foo.Bar` from dump
}
}

For Kotlin classes, the fully qualified names are used. It's important to keep in mind that periods . are used everywhere as separators, even in the case of nested classes. For example, in the qualified name foo.bar.Container.Value, Value is a class nested inside Container.

For classes from Java sources, canonical names are used. The main motivation is to ensure a consistent approach to writing class names, using periods . as delimiters throughout.

Name templates are allowed, with support for wildcards such as **, *, and ?:

  • ** - Matches zero or more characters, including periods.

  • * - Matches zero or more characters excluding periods. Use this to specify a single class name.

  • ? - Matches exactly one character.

filters {
excluded {
classes.add("**.My*") // A name filter that excludes classes in any non-root package with a name starting with `My`.
}
}