Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
class PsiElementResolver(val project: McProject, val sourceSetName: SourceSetName)

Functions

Link copied to clipboard
private fun KtAnnotated.annotatedJvmNameOrNull(): String?
Link copied to clipboard
fun KotlinType.asReferenceName(): ReferenceName
Link copied to clipboard
fun PsiElement.callSiteName(): String

This poorly-named function will return the most-qualified name available for a given PsiElement from the snippet of code where it's being called, without looking at imports.

Link copied to clipboard
suspend fun McProject.canResolveDeclaredName(declaredName: QualifiedDeclaredName, sourceSetName: SourceSetName): Boolean
Link copied to clipboard
suspend fun McProject.canResolveReferenceName(declaredName: ReferenceName, sourceSetName: SourceSetName): Boolean
Link copied to clipboard
fun PsiElement.childrenBreadthFirst(): Sequence<PsiElement>
inline fun PsiElement.childrenBreadthFirst(crossinline predicate: (PsiElement) -> Boolean): Sequence<PsiElement>
Link copied to clipboard
fun PsiElement.childrenDepthFirst(): Sequence<PsiElement>
inline fun PsiElement.childrenDepthFirst(crossinline predicate: (PsiElement) -> Boolean): Sequence<PsiElement>
Link copied to clipboard
inline fun <T : PsiElement> PsiElement.childrenOfTypeBreadthFirst(): Sequence<T>
Link copied to clipboard
inline fun <T : PsiElement> PsiElement.childrenOfTypeDepthFirst(): Sequence<T>
Link copied to clipboard
suspend fun PsiElement.declaredNameOrNull(project: McProject, sourceSetName: SourceSetName): QualifiedDeclaredName?
Link copied to clipboard
fun PsiElement.file(): File
Link copied to clipboard
fun KtNamedDeclaration.fqNameSafe(): FqName?

For a declaration with a name wrapped in backticks, this returns a name with those backticks. The regular fqName property does not.

Link copied to clipboard
fun KtValueArgumentList.getByNameOrIndex(index: Int, name: String): KtValueArgument?
Link copied to clipboard
fun KtAnnotated.hasAnnotation(annotationFqName: FqName): Boolean
Link copied to clipboard
internal fun KtImportDirective.identifier(): String?
Link copied to clipboard
fun KtNamedDeclaration.identifierName(): String?

Basically the same as name, but if the name has backticks, this will include it.

Link copied to clipboard
internal fun KtModifierListOwner.isAbstract(): Boolean
Link copied to clipboard
fun KtDeclaration.isCompanionObject(): Boolean
Link copied to clipboard
internal fun KtNamedDeclaration.isConst(): Boolean
Link copied to clipboard
internal fun KtModifierListOwner.isConstant(): Boolean
Link copied to clipboard
internal fun KtModifierListOwner.isExpect(): Boolean
Link copied to clipboard
internal fun KtModifierListOwner.isExternal(): Boolean
Link copied to clipboard
fun KtDeclaration.isInCompanionObject(): Boolean
Link copied to clipboard
internal fun KtModifierListOwner.isInline(): Boolean
Link copied to clipboard
fun KtDeclaration.isInObject(): Boolean
Link copied to clipboard
Link copied to clipboard
internal fun KtModifierListOwner.isInternal(): Boolean
Link copied to clipboard
fun KtProperty.isJvmField(): Boolean
Link copied to clipboard
fun KtCallableDeclaration.isJvmStatic(): Boolean
Link copied to clipboard
internal fun KtModifierListOwner.isLateinit(): Boolean
Link copied to clipboard
internal fun KtModifierListOwner.isOpen(): Boolean
Link copied to clipboard
internal fun KtModifierListOwner.isOperator(): Boolean
Link copied to clipboard
internal fun KtModifierListOwner.isOverride(): Boolean
Link copied to clipboard
inline fun <T : PsiElement> PsiElement.isPartOf(): Boolean
Link copied to clipboard
internal fun KtModifierListOwner.isPrivateOrInternal(): Boolean
Link copied to clipboard
internal fun KtModifierListOwner.isPublicNotOverridden(): Boolean
Link copied to clipboard
fun KtFunction.jvmNameOrNull(): String?
fun KtPropertyAccessor.jvmNameOrNull(): String?
Link copied to clipboard
internal fun KtNamedDeclaration.jvmSimpleNames(): Set<String>

Returns any custom names defined by @JvmName(...), the default setter/getter names if it's a property, or the same names as used by Kotlin for anything else.

Link copied to clipboard
fun KtBlockExpression.nameSafe(): String?
fun KtCallExpression.nameSafe(): String?
Link copied to clipboard
Link copied to clipboard
fun KtElement.requireSimpleName(): SimpleName
Link copied to clipboard
fun KtProperty.resolveType(bindingContext: BindingContext): VariableDescriptor?
Link copied to clipboard
fun KtPropertyDelegate.returnType(bindingContext: BindingContext): KotlinType?