FileDeclarationContext

data class FileDeclarationContext(val declaration: FileDeclaration, val modulePath: String)

Context wrapper for verifying source file declarations.

Provides both the target declaration and architectural metadata to easily query scope.

Constructors

Link copied to clipboard
constructor(declaration: FileDeclaration, modulePath: String)

Properties

Link copied to clipboard

Delegates classes property to the underlying FileDeclaration.

Link copied to clipboard

The underlying FileDeclaration AST model representing the source file.

Link copied to clipboard

Delegates imports property to the underlying FileDeclaration.

Link copied to clipboard

The module subdirectory/path containing this file.

Link copied to clipboard

Delegates name property to the underlying FileDeclaration.

Link copied to clipboard

Delegates packageName property to the underlying FileDeclaration.

Link copied to clipboard

Delegates topLevelFunctions property to the underlying FileDeclaration.

Link copied to clipboard

Delegates topLevelProperties property to the underlying FileDeclaration.

Functions

Link copied to clipboard

Helper extension to check if a file contains a class matching the predicate.

Link copied to clipboard

Helper extension to check if a file imports the specified match.

Link copied to clipboard

Helper extension to check if a file imports any match containing target segments.