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 defaultValue: String?

Default value of the declaration.

Link copied to clipboard

Determines whatever the declaration has crossinline modifier.

Link copied to clipboard

Determines whatever the declaration has noinline modifier.

Link copied to clipboard
abstract val hasValModifier: Boolean

Determines whatever the declaration has val modifier.

Link copied to clipboard

Determines whatever the declaration has vararg modifier.

Link copied to clipboard
abstract val hasVarModifier: Boolean

Determines whatever the declaration has var modifier.

Link copied to clipboard
abstract val isVal: Boolean

Determines whatever the declaration has val keyword.

Link copied to clipboard
abstract val isVar: Boolean

Determines whatever the declaration has var keyword.

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 numModifiers: Int

The number of modifiers.

Link copied to clipboard

Package 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
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
abstract val type: KoTypeDeclaration

Type of 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

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 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
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 hasDefaultValue(value: String? = null): Boolean

Determines whatever the declaration ha the default value.

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 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
abstract fun hasType(predicate: (KoTypeDeclaration) -> Boolean): Boolean

Determines whatever declaration has a specified type.

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

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

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

Determines whatever this declaration represents the specified type.

Link copied to clipboard

Returns true if declaration represents the type of T.

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.