KtLightElements: make light annotations lazier
Allow to get annotation list and to invoke `findAnnotation` without building delegate
Introduce KtLightNullabilityAnnotation which holds nullability information and is built
before delegate is built
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
public final class Annotations {
|
||||
@p.R(s = "a")
|
||||
@p.R(s = "b")
|
||||
@p.R(s = "c")
|
||||
public final void repeatables1() { /* compiled code */ }
|
||||
|
||||
@p.R(s = "a")
|
||||
public final void repeatables2() { /* compiled code */ }
|
||||
|
||||
@p.R(s = "a")
|
||||
@p.S(g = "b")
|
||||
@p.R(s = "c")
|
||||
@p.S(g = "D")
|
||||
@p.R(s = "f")
|
||||
public final void repeatables3() { /* compiled code */ }
|
||||
|
||||
public Annotations() { /* compiled code */ }
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// p.Annotations
|
||||
package p
|
||||
|
||||
|
||||
class Annotations {
|
||||
|
||||
@R("a") @R("b") @R("c")
|
||||
fun repeatables1() {
|
||||
|
||||
}
|
||||
|
||||
@R("a")
|
||||
fun repeatables2() {
|
||||
|
||||
}
|
||||
|
||||
@R("a") @S("b") @R("c") @S("D") @R("f")
|
||||
fun repeatables3() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Repeatable
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class S(val g: String)
|
||||
|
||||
@Repeatable
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class R(val s: String)
|
||||
Reference in New Issue
Block a user