Stub generation infrastructure (except for metadata generation) for KAPT+K2

This commit includes the basic Java stubs generation infrastructure and
the corresponding tests. The main entry point is called
Kapt4StubGenerator. Calls to it from production code will be added in a
separate commit.

 #KT-51982
This commit is contained in:
Pavel Mikhailovskii
2023-07-20 21:58:23 +02:00
committed by Space Team
parent ae4fab8483
commit 2002542ad2
113 changed files with 8249 additions and 34 deletions
@@ -0,0 +1,163 @@
@kotlin.Metadata()
public final class A {
@org.jetbrains.annotations.Nullable()
private final A x = null;
public A() {
super();
}
@org.jetbrains.annotations.Nullable()
public final A getX() {
return null;
}
@org.jetbrains.annotations.Nullable()
public final A f1(@org.jetbrains.annotations.NotNull()
A a, @org.jetbrains.annotations.NotNull()
A.B b) {
return null;
}
@kotlin.Metadata()
public static abstract interface B {
@org.jetbrains.annotations.Nullable()
public abstract A.B getY();
}
@kotlin.Metadata()
public static final class C {
@org.jetbrains.annotations.NotNull()
public static final A.C INSTANCE = null;
private C() {
super();
}
}
}
////////////////////
@kotlin.Metadata()
public final class A2 {
public A2() {
super();
}
@kotlin.Metadata()
public static final class B {
public B() {
super();
}
@kotlin.Metadata()
public static final class C {
public C() {
super();
}
@kotlin.Metadata()
public static final class D {
public D() {
super();
}
@kotlin.Metadata()
public static final class Cme {
public Cme() {
super();
}
}
@kotlin.Metadata()
public static final class E {
public E() {
super();
}
}
}
}
}
}
////////////////////
@kotlin.Metadata()
public final class Foo {
public Foo() {
super();
}
}
////////////////////
@kotlin.Metadata()
public final class Test {
public Test() {
super();
}
@kotlin.Metadata()
public static final class Nested {
public Nested() {
super();
}
@kotlin.Metadata()
public static final class NestedNested {
public NestedNested() {
super();
}
}
}
@kotlin.Metadata()
public final class Inner {
public Inner() {
super();
}
}
@kotlin.Metadata()
public static final class NestedObject {
@org.jetbrains.annotations.NotNull()
public static final Test.NestedObject INSTANCE = null;
private NestedObject() {
super();
}
}
@kotlin.Metadata()
public static abstract interface NestedInterface {
}
@kotlin.Metadata()
public static enum NestedEnum {
/*public static final*/ BLACK /* = new NestedEnum() */,
/*public static final*/ WHITE /* = new NestedEnum() */;
NestedEnum() {
}
@org.jetbrains.annotations.NotNull()
public static kotlin.enums.EnumEntries<Test.NestedEnum> getEntries() {
return null;
}
}
}