detekt-api
1.21.0-RC2

# Companion

object Companion
Content copied to clipboard

## Functions

atName
Link copied to clipboard
fun atName (element: KtNamedDeclaration): Entity
Content copied to clipboard

Create an entity at the location of the identifier of given named declaration.

atPackageOrFirstDecl
Link copied to clipboard
fun atPackageOrFirstDecl (file: KtFile): Entity
Content copied to clipboard

Create an entity at the location of the package, first import or first declaration.

from
Link copied to clipboard
fun from (element: PsiElement, location: Location ): Entity
Content copied to clipboard

Use this factory method if the location can be calculated much more precisely than using the given PsiElement.

fun from (element: PsiElement, offset: Int = 0): Entity
Content copied to clipboard

Factory function which retrieves all needed information from the PsiElement itself.