Properties

Link copied to clipboard

List of annotations.

Link copied to clipboard
abstract val bareSourceType: String

The source type without generic type arguments and nullability ("?").

Link copied to clipboard

The parent of the declaration.

Link copied to clipboard

File containing the declaration.

Link copied to clipboard
abstract val isAlias: Boolean

Returns true if this type is defined by the import alias.

Link copied to clipboard
abstract override val isClass: Boolean

Determines whatever declaration is a class.

Link copied to clipboard
abstract override val isClassOrInterface: Boolean

Determines whatever declaration is a class or an interface.

Link copied to clipboard
abstract override val isClassOrInterfaceOrObject: Boolean

Determines whatever declaration is a class, an interface or an object.

Link copied to clipboard
abstract override val isClassOrObject: Boolean

Determines whatever declaration is a class or an object.

Link copied to clipboard
abstract override val isExternal: Boolean

Determines whatever declaration is an external. An external declaration refers to a declaration that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard
abstract val isExternalType: Boolean

Determines whatever source declaration is an external type. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard
abstract override val isFunction: Boolean

Determines whatever declaration is a function.

Link copied to clipboard
abstract val isFunctionType: Boolean

Determines whatever type is function type.

Link copied to clipboard
abstract val isGeneric: Boolean

Determines whatever declaration is generic.

Link copied to clipboard
abstract val isGenericType: Boolean

Determines whatever type is generic type.

Link copied to clipboard
abstract override val isImportAlias: Boolean

Determines whatever declaration is import alias.

Link copied to clipboard
abstract override val isInterface: Boolean

Determines whatever declaration is an interface.

Link copied to clipboard
abstract override val isInterfaceOrObject: Boolean

Determines whatever declaration is an interface or an object.

Link copied to clipboard
abstract override val isKotlinBasicType: Boolean

Determines whatever declaration is a Kotlin stdlib basic type Basic types

Link copied to clipboard
abstract override val isKotlinCollectionType: Boolean

Determines whatever declaration is a Kotlin stdlib Collection type Collections overview.

Link copied to clipboard
abstract override val isKotlinType: Boolean

Determines whatever declaration is a build in Kotlin type. It can be a basic Kotlin type Basic types or collection type Collections overview (https://kotlinlang.org/docs/collections-overview.html#collection).

Link copied to clipboard
abstract val isMutableType: Boolean

Determines whether the declaration is a mutable type.

Link copied to clipboard
abstract val isNullable: Boolean

Determines whatever declaration type is nullable.

Link copied to clipboard
abstract override val isObject: Boolean

Determines whatever declaration is an object.

Link copied to clipboard
abstract override val isProperty: Boolean

Determines whatever declaration is a property.

Link copied to clipboard

Determines whether the source declaration is a star projection. A star projection is a placeholder that represents any type in a generic context, allowing for flexible type constraints.

Link copied to clipboard
abstract override val isTypeAlias: Boolean

Determines whatever declaration is a type alias.

Link copied to clipboard
abstract override val isTypeParameter: Boolean

Determines whatever declaration is a type parameter.

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

The number of parameters for the function type.

Link copied to clipboard
abstract val numParameterTypes: Int

The number of parameters for the function type.

Link copied to clipboard
abstract val numTypeArguments: Int

The number of type arguments.

Link copied to clipboard

Package of the declaration.

Link copied to clipboard

Represents the parameters of the function type.

Link copied to clipboard

Represents the parameters of the function type.

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

Represents the return type of the function type.

Link copied to clipboard

Represents the source declaration associated with this type.

Link copied to clipboard
abstract val sourceSetName: String

The declaration's source set name.

Link copied to clipboard
abstract val sourceType: String

The source type. For val car:MyClass it will be "MyClass". For val car:MyClass<String> it will be "MyClass".

Link copied to clipboard
abstract val text: String

Text of the declaration.

Link copied to clipboard

A list of type arguments associated with this declaration, if any. If there are no type arguments, this returns null.

Functions

Link copied to clipboard
abstract override fun asClassDeclaration(): KoClassDeclaration?

Represents the class declaration associated with this declaration.

Link copied to clipboard

Represents the class or interface declaration associated with this declaration.

Link copied to clipboard

Represents the class, interface or object declaration associated with this declaration.

Link copied to clipboard

Represents the class or object declaration associated with this declaration.

Link copied to clipboard

Represents the external declaration associated with this declaration. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard

Represents the external declaration associated with this declaration. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard

Represents the function declaration associated with this declaration.

Link copied to clipboard

Represents the import alias declaration associated with this declaration.

Link copied to clipboard

Represents the interface declaration associated with this declaration.

Link copied to clipboard

Represents the interface or object declaration associated with this declaration.

Link copied to clipboard

Represents the Kotlin basic type declaration associated with this declaration.

Link copied to clipboard

Represents the Kotlin collection type declaration associated with this declaration.

Link copied to clipboard

Represents the Kotlin type declaration associated with this declaration.

Link copied to clipboard
abstract override fun asObjectDeclaration(): KoObjectDeclaration?

Represents the object declaration associated with this declaration.

Link copied to clipboard

Represents the property declaration associated with this declaration.

Link copied to clipboard

Represents the declaration alias declaration associated with this declaration.

Link copied to clipboard

Represents the declaration parameter declaration associated with this declaration.

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 countParameters(predicate: (KoParameterDeclaration) -> Boolean): Int

Counts the number of parameters that match the given predicate.

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

Counts the number of parameter types that match the given predicate.

Link copied to clipboard

Counts the number of type arguments that match the given predicate.

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

Checks if all parameters match the given predicate.

Link copied to clipboard

Checks if all parameter types match the given predicate.

Link copied to clipboard

Checks if all type arguments match the given predicate.

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

Checks if all type arguments match the specified class.

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 override fun hasClassDeclaration(predicate: (KoClassDeclaration) -> Boolean?): Boolean

Whether declaration has a specified class declaration.

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

Whether declaration has a class declaration of the specified Kotlin class.

Link copied to clipboard

Whether declaration has a specified class or interface declaration.

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

Whether declaration has a class or an interface declaration of the specified Kotlin class.

Link copied to clipboard

Whether declaration has a specified class, interface or object declaration.

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

Whether declaration has a class, an interface or an object declaration of the specified Kotlin class.

Link copied to clipboard

Whether declaration has a specified class or object declaration.

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

Whether declaration has a class or an object declaration of the specified Kotlin class.

Link copied to clipboard
abstract override fun hasExternalDeclaration(predicate: (KoExternalDeclaration) -> Boolean?): Boolean

Whether declaration has a specified external type declaration. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

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

Whether declaration has a external type declaration of the specified Kotlin class. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

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

Whether type has a specified external type declaration. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

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

Whether type has a external type declaration of the specified Kotlin class. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard
abstract override fun hasFunctionDeclaration(predicate: (KoFunctionDeclaration) -> Boolean?): Boolean

Whether declaration has a specified function declaration.

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

Whether declaration has a function declaration of the specified Kotlin function.

Link copied to clipboard
abstract override fun hasImportAliasDeclaration(predicate: (KoImportAliasDeclaration) -> Boolean?): Boolean

Whether declaration has a specified import alias declaration.

Link copied to clipboard
abstract override fun hasInterfaceDeclaration(predicate: (KoInterfaceDeclaration) -> Boolean?): Boolean

Whether declaration has a specified interface declaration.

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

Whether declaration has an interface declaration of the specified Kotlin class.

Link copied to clipboard

Whether declaration has a specified interface or object declaration.

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

Whether declaration has an interface or an object declaration of the specified Kotlin class.

Link copied to clipboard
abstract override fun hasKotlinBasicTypeDeclaration(predicate: (KoKotlinTypeDeclaration) -> Boolean?): Boolean

Whether declaration has a specified kotlin basic type declaration.

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

Whether declaration has a kotlin basic type declaration of the specified Kotlin class.

Link copied to clipboard

Whether declaration has a specified kotlin collection type declaration.

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

Whether declaration has a kotlin collection type declaration of the specified Kotlin class.

Link copied to clipboard
abstract override fun hasKotlinTypeDeclaration(predicate: (KoKotlinTypeDeclaration) -> Boolean?): Boolean

Whether declaration has a specified kotlin type declaration.

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

Whether declaration has a kotlin type declaration of the specified Kotlin class.

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 override fun hasObjectDeclaration(predicate: (KoObjectDeclaration) -> Boolean?): Boolean

Whether declaration has a specified object declaration.

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

Whether declaration has a object declaration of the specified Kotlin class.

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

Checks if any parameter matches the given predicate.

Link copied to clipboard

Checks if any parameter type matches the given predicate.

Link copied to clipboard
abstract override fun hasPropertyDeclaration(predicate: (KoPropertyDeclaration) -> Boolean?): Boolean

Whether declaration has a specified property declaration.

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

Whether declaration has a property declaration of the specified Kotlin property.

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

Checks if the return type matches the given predicate.

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

Checks if the return type matches the specified class.

Link copied to clipboard

Determines whatever type has a specified source declaration.

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

Whether type has a source declaration of the specified Kotlin class.

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 override fun hasTypeAliasDeclaration(predicate: (KoTypeAliasDeclaration) -> Boolean?): Boolean

Whether declaration has a specified type alias declaration.

Link copied to clipboard

Checks if any type argument matches the given predicate.

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

Checks if any type argument is of the specified class.

Link copied to clipboard
abstract fun hasTypeArguments(): Boolean

Determines whatever the declaration has type arguments.

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

Checks if all type arguments have one of the specified names.

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

Checks if any type argument has one of the specified names.

Link copied to clipboard

Whether declaration has a specified type parameter declaration.

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.