[KAPT4] KT-51982 Implement generation of @Metadata annotations in Java stubs

Also adds rendering of @Metadata annotations in Kapt3 and Kapt4 tests
(currently disabled for a few tests).

Co-authored-by: Alexander Udalov <alexander.udalov@jetbrains.com>
This commit is contained in:
strangepleasures
2023-07-31 23:09:08 +02:00
committed by Space Team
parent f40fc1b0c6
commit 2423b7b62f
250 changed files with 15438 additions and 81 deletions
@@ -1,3 +1,12 @@
/**
* public final class AnotherRootClass : kotlin/Any {
*
* // signature: <init>()V
* public constructor()
*
* // module name: main
* }
*/
@kotlin.Metadata()
public final class AnotherRootClass {
@@ -9,6 +18,15 @@ public final class AnotherRootClass {
////////////////////
/**
* public final class RootClass : kotlin/Any {
*
* // signature: <init>()V
* public constructor()
*
* // module name: main
* }
*/
@kotlin.Metadata()
public final class RootClass {
@@ -37,6 +55,21 @@ public @interface ClassRefAnnotation {
package test;
/**
* public abstract interface test/PackedClass : kotlin/Any {
*
* // signature: oneMoreMethod()LAnotherRootClass;
* public abstract fun oneMoreMethod(): AnotherRootClass
*
* // signature: otherMethod()Ljava/lang/Number;
* public abstract fun otherMethod(): java/lang/Number
*
* // signature: someMethod()LRootClass;
* public abstract fun someMethod(): RootClass
*
* // module name: main
* }
*/
@kotlin.Metadata()
public abstract interface PackedClass {
@@ -54,6 +87,15 @@ public abstract interface PackedClass {
package test;
/**
* public final class test/PackedWithAnnotation : kotlin/Any {
*
* // signature: <init>()V
* public constructor()
*
* // module name: main
* }
*/
@kotlin.Metadata()
@ClassRefAnnotation(value = {RootClass.class})
public final class PackedWithAnnotation {