Introduce AnnotationDescriptor.fqName

Could be used instead of ".annotationClass.fqName" to avoid the unneeded
resolution of the annotation class descriptor
This commit is contained in:
Alexander Udalov
2017-07-04 15:21:52 +03:00
parent 1d64b61a8f
commit 41ea0e8ef8
18 changed files with 48 additions and 105 deletions
@@ -5,7 +5,6 @@ import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.psi.KtAnnotationEntry
import org.jetbrains.kotlin.resolve.BindingContext
import org.jetbrains.kotlin.resolve.descriptorUtil.annotationClass
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
import org.jetbrains.uast.*
class KotlinUAnnotation(
@@ -15,7 +14,7 @@ class KotlinUAnnotation(
private val resolvedAnnotation by lz { psi.analyze()[BindingContext.ANNOTATION, psi] }
override val qualifiedName: String?
get() = resolvedAnnotation?.annotationClass?.fqNameSafe?.asString()
get() = resolvedAnnotation?.fqName?.asString()
override val attributeValues by lz {
val context = getUastContext()