GlobMatcher

class GlobMatcher(val includePatterns: List<String>, val excludePatterns: List<String>)(source)

Matches fully qualified type names against include/exclude glob patterns.

Filtering order matches the KSP processor's SymbolFilter:

  1. Include patterns: if non-empty, the name must match at least one.

  2. Exclude patterns: a name matching any of these is dropped.

Glob syntax: * matches any sequence of non-. characters; ** matches any sequence including .; ? matches a single non-. character. All other characters are matched literally.

Parameters

includePatterns

glob patterns; if non-empty, a name must match at least one to be included.

excludePatterns

glob patterns; a name matching any of these is excluded.

Constructors

Link copied to clipboard
constructor(includePatterns: List<String>, excludePatterns: List<String>)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun matches(name: String): Boolean

Returns true when name matches at least one include pattern, or when no include patterns are configured. Never true for an excluded name.

Link copied to clipboard

Returns true when name matches at least one exclude pattern.

Link copied to clipboard

Returns true when name matches at least one include pattern. Returns false when no include patterns are configured.