org.jetbrains.kotlin.kapt4.parseParameters.kt Maven / Gradle / Ivy
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@file:Suppress("UnstableApiUsage")
package org.jetbrains.kotlin.kapt4
import com.intellij.psi.JvmPsiConversionHelper
import com.intellij.psi.PsiAnnotation
import com.intellij.psi.PsiMethod
import com.intellij.psi.PsiType
internal class ParameterInfo(
val name: String,
val type: PsiType,
val annotations: List,
)
internal fun PsiMethod.getParametersInfo(): List {
val typeConverter = JvmPsiConversionHelper.getInstance(project)
return this.parameterList.parameters.map {
ParameterInfo(it.name, typeConverter.convertType(it.type), it.annotations.asList())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy