Properties

Link copied to clipboard
abstract val hasInModifier: Boolean

Determines whatever the declaration has in modifier.

Link copied to clipboard
abstract val hasOutModifier: Boolean

Determines whatever the declaration has out modifier.

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

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 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 name: String

Name of the declaration.

Link copied to clipboard
abstract val numModifiers: Int

The number of modifiers.

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

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

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

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

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
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 override fun toString(): String

String representing the declaration.