mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 08:31:28 +00:00
Step 0: Light class object is created, no delegates are computed Step 1: constructs dummy delegate which can not be relied upon to know signature of any member It can be used to construct light field and light method objects (which can correctly respond to some queries) before constructing real delegate Step 2: Construct real delegate if dummy delegate is not enough to respond to a query This speeds up multiple scenarios where getMethods() and getFields() are called on numerous classes Dummy delegate's faster consruction is achieved by using specially setup dumb analysis instead of ide analysis Introduce LazyLightClassDataHolder: which manages creation of Step 1 and Step 2 delegates Introduce MemberIndex: keeping track of member creation order, helps matching light class delegates created in different contexts KtLightMethod and Field: make use of dummy delegate KtLightMethod no longer extends LightMethod since it requires eager delegate construction KtLightMethod now implements PsiAnnotationMethod for convenience (ClsMethodImpl implements PsiAnnotationMethod)
10 lines
103 B
Kotlin
Vendored
10 lines
103 B
Kotlin
Vendored
class Foo {
|
|
fun bar() {
|
|
}
|
|
}
|
|
|
|
val x = Foo::bar
|
|
|
|
// REF:Foo::bar
|
|
// RESULT:KtLightMethodImpl:bar
|