FunctionDeclarationContext

data class FunctionDeclarationContext(val declaration: FunctionDeclaration, val packageName: String, val className: String?, val modulePath: String, val filePath: String, val sourceSet: SourceSetId? = null, val usages: List<SourceUsage> = emptyList())

Context wrapper for verifying function declarations.

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

Constructors

Link copied to clipboard
constructor(declaration: FunctionDeclaration, packageName: String, className: String?, modulePath: String, filePath: String, sourceSet: SourceSetId? = null, usages: List<SourceUsage> = emptyList())

Properties

Link copied to clipboard

Delegates annotations property to the underlying FunctionDeclaration.

Link copied to clipboard

Filter or assertion criteria for class name.

Link copied to clipboard

Filter or assertion criteria for declaration.

Link copied to clipboard

Filter or assertion criteria for file path.

Link copied to clipboard

Delegates isExtension property to the underlying FunctionDeclaration.

Link copied to clipboard

Delegates kdocText property to the underlying FunctionDeclaration.

Link copied to clipboard

Delegates modifiers property to the underlying FunctionDeclaration.

Link copied to clipboard

Filter or assertion criteria for module path.

Link copied to clipboard

Delegates name property to the underlying FunctionDeclaration.

Link copied to clipboard

Filter or assertion criteria for package name.

Link copied to clipboard

Delegates parameters property to the underlying FunctionDeclaration.

Link copied to clipboard

The fully-qualified name of the function, combining package, enclosing class (if any), and simple name (e.g. com.acme.UserService.getUser), used to identify it unambiguously in violation messages.

Link copied to clipboard

Delegates returnType property to the underlying FunctionDeclaration.

Link copied to clipboard
val sourceSet: SourceSetId? = null

Filter or assertion criteria for source set.

Link copied to clipboard

Filter or assertion criteria for usages.

Link copied to clipboard

Delegates visibility property to the underlying FunctionDeclaration.

Functions

Link copied to clipboard

Helper extension to check if a function has all of the specified annotations.

Link copied to clipboard

Helper extension to check if a function has the specified annotation.

Link copied to clipboard

Helper extension to check if a function has any of the specified annotations.