Properties

Link copied to clipboard

List of annotations.

Link copied to clipboard

The parent of the declaration.

Link copied to clipboard

File containing the declaration.

Link copied to clipboard
abstract val fullyQualifiedName: String?

Fully qualified name of the declaration.

Link copied to clipboard

Determines whatever declaration has abstract modifier.

Link copied to clipboard

Determines whatever class has actual modifier.

Link copied to clipboard
abstract val hasBlockBody: Boolean

Determines whatever declaration has block body.

Link copied to clipboard

Determines whatever declaration has expect modifier.

Link copied to clipboard

Determines whatever declaration has expression body.

Link copied to clipboard

Determines whatever the declaration has external modifier.

Link copied to clipboard

Determines whatever declaration has final modifier.

Link copied to clipboard

Determines whatever the declaration has infix modifier.

Link copied to clipboard

Determines whatever the declaration has inline modifier.

Link copied to clipboard

Determines whatever the declaration has internal modifier.

Link copied to clipboard
abstract val hasKDoc: Boolean

Determines whatever the declaration has kDoc.

Link copied to clipboard
abstract val hasOpenModifier: Boolean

Determines whatever declaration has open modifier.

Link copied to clipboard

Determines whatever the declaration has operator modifier.

Link copied to clipboard

Determines whatever the declaration has override modifier.

Link copied to clipboard

Determines whatever the declaration has private modifier.

Link copied to clipboard

Determines whatever the declaration has protected modifier.

Link copied to clipboard

Determines whatever the declaration has public modifier.

Link copied to clipboard

Determines whatever the declaration has public or no visibility modifier.

Link copied to clipboard
abstract val hasReturnValue: Boolean

Indicates whether a declaration has a non-Unit return value.

Link copied to clipboard

Determines whatever the declaration has suspend modifier.

Link copied to clipboard

Determines whatever the declaration has tailrec modifier.

Link copied to clipboard
abstract val isExtension: Boolean

Indicates whether the declaration is an extension.

Link copied to clipboard
abstract val isGeneric: Boolean

Determines whatever declaration is generic.

Link copied to clipboard
abstract val isInitialized: Boolean

Determines whatever this declaration has been initialized. Declaration that has been initialized has a body. e.g.

Link copied to clipboard
abstract val isTopLevel: Boolean

Determines whatever the declaration is defined at top level.

Link copied to clipboard
abstract val kDoc: KoKDocDeclaration?

Documentation of the declaration.

Link copied to clipboard

The local classes present in the declaration.

Link copied to clipboard

The local declarations present in the declaration.

Link copied to clipboard

The local functions present in the declaration.

Link copied to clipboard
abstract val location: String

Location of the declaration containing the file path, line and column.

Link copied to clipboard
abstract val locationWithText: String

Text of the declaration with the location (file path, line and column).

Link copied to clipboard
abstract val modifiers: List<KoModifier>

List of modifiers.

Link copied to clipboard
abstract val moduleName: String

The declaration's module name.

Link copied to clipboard
abstract val name: String

Name of the declaration.

Link copied to clipboard
abstract val numAnnotations: Int

The number of annotations.

Link copied to clipboard
abstract val numLocalClasses: Int

The number of local classes.

Link copied to clipboard

The number of local declarations.

Link copied to clipboard
abstract val numLocalFunctions: Int

The number of local functions.

Link copied to clipboard
abstract val numModifiers: Int

The number of modifiers.

Link copied to clipboard
abstract val numParameters: Int

The number of parameters.

Link copied to clipboard
abstract val numTypeParameters: Int

The number of type parameters.

Link copied to clipboard
abstract val numVariables: Int

The number of variables.

Link copied to clipboard

Package of the declaration.

Link copied to clipboard

Parameters of the declaration.

Link copied to clipboard
abstract val path: String

File path of the declaration or path of the file.

Link copied to clipboard
abstract val projectPath: String

Project file path of the declaration or root project path of the file.

Link copied to clipboard

Receiver type of the declaration.

Link copied to clipboard

Return type of the declaration.

Link copied to clipboard
abstract val sourceSetName: String

The declaration's source set name.

Link copied to clipboard
abstract val text: String

Text of the declaration.

Link copied to clipboard

Type parameters of the declaration.

Link copied to clipboard

The variables present in the declaration.

Functions

Link copied to clipboard
abstract fun countAnnotations(predicate: (KoAnnotationDeclaration) -> Boolean): Int

Returns the number of annotations that satisfies the specified predicate present in the declaration.

Link copied to clipboard
abstract fun countLocalClasses(predicate: (KoClassDeclaration) -> Boolean): Int

Returns the number of local classes that satisfies the specified predicate present in the declaration.

Link copied to clipboard
abstract fun countLocalDeclarations(predicate: (KoBaseDeclaration) -> Boolean): Int

Returns the number of local declarations that satisfies the specified predicate present in the declaration.

Link copied to clipboard
abstract fun countLocalFunctions(predicate: (KoFunctionDeclaration) -> Boolean): Int

Returns the number of local functions that satisfies the specified predicate present in the declaration.

Link copied to clipboard
abstract fun countParameters(predicate: (KoParameterDeclaration) -> Boolean): Int

Returns the number of parameters that satisfies the specified predicate present in the declaration.

Link copied to clipboard

Returns the number of type parameters that satisfies the specified predicate present in the declaration.

Link copied to clipboard
abstract fun countVariables(predicate: (KoVariableDeclaration) -> Boolean): Int

Gets the number of variables that satisfies the specified predicate present in the declaration.

Link copied to clipboard

Determines whether the declaration has all annotations that satisfy the provided predicate.

Link copied to clipboard
abstract fun hasAllAnnotationsOf(names: Collection<KClass<*>>): Boolean
abstract fun hasAllAnnotationsOf(name: KClass<*>, vararg names: KClass<*>): Boolean

Determines whether the declaration has annotations with all the specified KClass type.

Link copied to clipboard
abstract fun hasAllLocalClasses(predicate: (KoClassDeclaration) -> Boolean): Boolean

Determines whether the declaration has all local classes that satisfy the provided predicate.

Link copied to clipboard

Determines whether the declaration has all local declarations that satisfy the provided predicate.

Link copied to clipboard

Determines whether the declaration has all local functions that satisfy the provided predicate.

Link copied to clipboard
abstract fun hasAllModifiers(modifiers: Collection<KoModifier>): Boolean
abstract fun hasAllModifiers(modifier: KoModifier, vararg modifiers: KoModifier): Boolean

Determines whether the declaration has all specified modifiers.

Link copied to clipboard

Determines whether the declaration has all parameters that satisfy the provided predicate.

Link copied to clipboard

Determines whether the declaration has all type parameters that satisfy the provided predicate.

Link copied to clipboard
abstract fun hasAllVariables(predicate: (KoVariableDeclaration) -> Boolean): Boolean

Determines whether the declaration has all variables that satisfy the provided predicate.

Link copied to clipboard
abstract fun hasAnnotation(predicate: (KoAnnotationDeclaration) -> Boolean): Boolean

Determines whether the declaration has at least one annotation that satisfies the provided predicate.

Link copied to clipboard
abstract fun hasAnnotationOf(names: Collection<KClass<*>>): Boolean
abstract fun hasAnnotationOf(name: KClass<*>, vararg names: KClass<*>): Boolean

Determines whether the declaration has at least one annotation of the specified KClass type.

Link copied to clipboard

Returns true if declaration represents the type of T.

Link copied to clipboard
abstract fun hasAnnotations(): Boolean

Determines whatever declaration has any annotation.

Link copied to clipboard
abstract fun hasAnnotationsWithAllNames(name: String, vararg names: String): Boolean

Determines whether the declaration has annotations with all the specified names.

Link copied to clipboard
abstract fun hasAnnotationWithName(name: String, vararg names: String): Boolean

Determines whether the declaration has at least one annotation whose name matches any of the specified names.

Link copied to clipboard
abstract fun hasLocalClass(predicate: (KoClassDeclaration) -> Boolean): Boolean

Determines whether the declaration has at least one local class that satisfies the provided predicate.

Link copied to clipboard
abstract fun hasLocalClasses(): Boolean

Determines whatever the declaration has local classes.

Link copied to clipboard
abstract fun hasLocalClassesWithAllNames(name: String, vararg names: String): Boolean

Determines whether the declaration has local classes with all the specified names.

Link copied to clipboard
abstract fun hasLocalClassWithName(name: String, vararg names: String): Boolean

Determines whether the declaration has at least one local class whose name matches any of the specified names.

Link copied to clipboard
abstract fun hasLocalDeclaration(predicate: (KoBaseDeclaration) -> Boolean): Boolean

Determines whether the declaration has at least one local declaration that satisfies the provided predicate.

Link copied to clipboard

Determines whatever the declaration has local declarations.

Link copied to clipboard
abstract fun hasLocalFunction(predicate: (KoFunctionDeclaration) -> Boolean): Boolean

Determines whether the declaration has at least one local function that satisfies the provided predicate.

Link copied to clipboard
abstract fun hasLocalFunctions(): Boolean

Determines whatever the declaration has local functions.

Link copied to clipboard
abstract fun hasLocalFunctionsWithAllNames(name: String, vararg names: String): Boolean

Determines whether the declaration has local functions with all the specified names.

Link copied to clipboard
abstract fun hasLocalFunctionWithName(name: String, vararg names: String): Boolean

Determines whether the declaration has at least one local function whose name matches any of the specified names.

Link copied to clipboard
abstract fun hasModifier(modifiers: Collection<KoModifier>): Boolean
abstract fun hasModifier(modifier: KoModifier, vararg modifiers: KoModifier): Boolean

Determines whether the declaration has at least one specified modifier.

Link copied to clipboard
abstract fun hasModifiers(): Boolean

Determines whatever the declaration has modifiers.

Link copied to clipboard
abstract fun hasNameContaining(text: String): Boolean

Name of the declaration containing text.

Link copied to clipboard
abstract fun hasNameEndingWith(suffix: String): Boolean

Name of the declaration with suffix.

Link copied to clipboard
abstract fun hasNameMatching(regex: Regex): Boolean

Name of the declaration matching regex.

Link copied to clipboard
abstract fun hasNameStartingWith(prefix: String): Boolean

Name of the declaration with prefix.

Link copied to clipboard
abstract fun hasParameter(predicate: (KoParameterDeclaration) -> Boolean): Boolean

Determines whether the declaration has at least one parameter that satisfies the provided predicate.

Link copied to clipboard
abstract fun hasParameters(): Boolean

Determines whatever declaration has any parameter.

Link copied to clipboard
abstract fun hasParametersWithAllNames(name: String, vararg names: String): Boolean

Determines whether the declaration has parameters with all the specified names.

Link copied to clipboard
abstract fun hasParameterWithName(name: String, vararg names: String): Boolean

Determines whether the declaration has at least one parameter whose name matches any of the specified names.

Link copied to clipboard
abstract fun hasReceiverType(predicate: (KoTypeDeclaration) -> Boolean? = null): Boolean

Determines whatever declaration has a specified receiver type.

Link copied to clipboard
abstract fun hasReceiverTypeOf(kClass: KClass<*>): Boolean

Determines whatever declaration has a receiver type of the specified Kotlin class.

Link copied to clipboard

Determines whatever declaration has receiver type.

Link copied to clipboard
abstract fun hasReturnType(predicate: (KoTypeDeclaration) -> Boolean? = null): Boolean

Determines whatever declaration has a specified return type.

Link copied to clipboard
abstract fun hasReturnTypeOf(kClass: KClass<*>): Boolean

Determines whatever declaration has a return type of the specified Kotlin class.

Link copied to clipboard

Determines whatever declaration has return type.

Link copied to clipboard
abstract fun hasTextContaining(str: String): Boolean

Text of the declaration containing text.

Link copied to clipboard
abstract fun hasTextEndingWith(suffix: String): Boolean

Text of the declaration with suffix.

Link copied to clipboard
abstract fun hasTextMatching(regex: Regex): Boolean

Text of the declaration matching regex.

Link copied to clipboard
abstract fun hasTextStartingWith(prefix: String): Boolean

Text of the declaration with prefix.

Link copied to clipboard

Determines whether the declaration has at least one type parameter that satisfies the provided predicate.

Link copied to clipboard
abstract fun hasTypeParameters(): Boolean

Determines whatever declaration has any type parameter.

Link copied to clipboard
abstract fun hasTypeParametersWithAllNames(name: String, vararg names: String): Boolean

Determines whether the declaration has type parameters with all the specified names.

Link copied to clipboard
abstract fun hasTypeParameterWithName(name: String, vararg names: String): Boolean

Determines whether the declaration has at least one type parameter whose name matches any of the specified names.

Link copied to clipboard
abstract fun hasVariable(predicate: (KoVariableDeclaration) -> Boolean): Boolean

Determines whether the declaration has at least one variable that satisfies the provided predicate.

Link copied to clipboard
abstract fun hasVariables(): Boolean

Whether the declaration has variables.

Link copied to clipboard
abstract fun hasVariablesWithAllNames(name: String, vararg names: String): Boolean

Determines whether the declaration has variables with all the specified names.

Link copied to clipboard
abstract fun hasVariableWithName(name: String, vararg names: String): Boolean

Determines whether the declaration has at least one variable whose name matches any of the specified names.

Link copied to clipboard
abstract fun resideInModule(name: String): Boolean

Determines whatever declaration reside in module.

Link copied to clipboard
abstract fun resideInPackage(name: String): Boolean

Determines whatever the declaration resides in a package.

Link copied to clipboard
abstract fun resideInPath(path: String, absolutePath: Boolean = false): Boolean

Determines whatever declaration reside in file path or file reside in path.

Link copied to clipboard
abstract fun resideInSourceSet(sourceSetName: String): Boolean

Determines whatever declaration reside in source set.

Link copied to clipboard
abstract fun resideOutsidePackage(name: String): Boolean

Determines whatever the declaration resides outside a package.

Link copied to clipboard
abstract override fun toString(): String

String representing the declaration.