Support annotation based on descriptor in ultra-light classes

It helps to generate properly the annotations for delegates
Also note in test, that annotations in Base class have really weird
text of arguments and also don't have names
This commit is contained in:
Denis Zharkov
2018-12-05 16:25:03 +03:00
parent 63907b1a6b
commit 2f8b214e76
12 changed files with 263 additions and 5 deletions

View File

@@ -0,0 +1,42 @@
@java.lang.annotation.Retention(null=java.lang.annotation.RetentionPolicy.RUNTIME)
public abstract @interface SimpleAnn /* SimpleAnn*/ {
@null()
public abstract java.lang.String value();
}
@java.lang.annotation.Retention(null=java.lang.annotation.RetentionPolicy.RUNTIME)
public abstract @interface Ann /* Ann*/ {
@null()
public abstract SimpleAnn[] t();
@null()
public abstract java.lang.Class<?> z();
@null()
public abstract java.lang.Class<?>[] e();
@null()
public abstract java.lang.String y();
@null()
public abstract kotlin.DeprecationLevel depr();
public abstract int x();
}
public abstract interface Base /* Base*/ {
@Ann(null=1, null="134", null=String::class, null=arrayOf(Int::class, Double::class), null=DeprecationLevel.WARNING, null=SimpleAnn("243"), null=SimpleAnn("4324"))
public abstract void foo(@Ann(null=2, null="324", null=Ann::class, null=arrayOf(Byte::class, Base::class), null=DeprecationLevel.WARNING, null=SimpleAnn("687"), null=SimpleAnn("78")) @org.jetbrains.annotations.NotNull() java.lang.String);
}
public final class Derived /* Derived*/ implements Base {
@Ann(x=1, y="134", z=String.class, e={Integer.class, Double.class}, depr=DeprecationLevel.WARNING, t={@SimpleAnn(value="243"), @SimpleAnn(value="4324")})
public void foo(@Ann(x=2, y="324", z=Ann.class, e={Byte.class, Base.class}, depr=DeprecationLevel.WARNING, t={@SimpleAnn(value="687"), @SimpleAnn(value="78")}) @org.jetbrains.annotations.NotNull() java.lang.String);
@null()
public Derived(@org.jetbrains.annotations.NotNull() Base);
}