Load default values for annotation members from classfiles

so that defaults are available to synthetic implementations.

#KT-48181 Fixed

Implementation is for JVM IR; other backends & FIR need to be supported
separately.
This commit is contained in:
Leonid Startsev
2021-11-19 15:32:28 +03:00
committed by Space
parent e8868a2eff
commit 767c570af4
18 changed files with 339 additions and 109 deletions
@@ -44,18 +44,20 @@ interface KotlinJvmBinaryClass {
interface MethodAnnotationVisitor : AnnotationVisitor {
fun visitParameterAnnotation(index: Int, classId: ClassId, source: SourceElement): AnnotationArgumentVisitor?
fun visitAnnotationMemberDefaultValue(): AnnotationArgumentVisitor?
}
interface AnnotationArgumentVisitor {
fun visit(name: Name?, value: Any?)
fun visitClassLiteral(name: Name, value: ClassLiteralValue)
fun visitClassLiteral(name: Name?, value: ClassLiteralValue)
fun visitEnum(name: Name, enumClassId: ClassId, enumEntryName: Name)
fun visitEnum(name: Name?, enumClassId: ClassId, enumEntryName: Name)
fun visitAnnotation(name: Name, classId: ClassId): AnnotationArgumentVisitor?
fun visitAnnotation(name: Name?, classId: ClassId): AnnotationArgumentVisitor?
fun visitArray(name: Name): AnnotationArrayArgumentVisitor?
fun visitArray(name: Name?): AnnotationArrayArgumentVisitor?
fun visitEnd()
}