mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 00:21:26 +00:00
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:
42
compiler/testData/asJava/ultraLightClasses/delegatesWithAnnotations.java
vendored
Normal file
42
compiler/testData/asJava/ultraLightClasses/delegatesWithAnnotations.java
vendored
Normal 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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user