Kapt: Support androidx.annotation.RecentlyNullable annotations (KT-26725)

This commit is contained in:
Yan Zhulanow
2018-09-28 22:31:47 +03:00
parent ac1dd59472
commit 6d017f07ad
4 changed files with 76 additions and 1 deletions
@@ -0,0 +1,23 @@
// FILE: androidx/annotation/RecentlyNullable.java
package androidx.annotation;
import java.lang.annotation.*;
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD})
@interface RecentlyNullable {}
// FILE: androidx/annotation/Box.java
package androidx.annotation;
public interface Box {
@RecentlyNullable
public String foo();
}
// FILE: test.kt
package app
import androidx.annotation.Box
class KBox(val delegate: Box) : Box by delegate
@@ -0,0 +1,46 @@
package androidx.annotation;
public interface Box {
@RecentlyNullable()
public String foo();
}
////////////////////
package androidx.annotation;
import java.lang.annotation.*;
@Retention(value = RetentionPolicy.CLASS)
@Target(value = {ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD})
@interface RecentlyNullable {
}
////////////////////
package app;
import java.lang.System;
@kotlin.Metadata()
public final class KBox implements androidx.annotation.Box {
@org.jetbrains.annotations.NotNull()
private final androidx.annotation.Box delegate = null;
@org.jetbrains.annotations.NotNull()
public final androidx.annotation.Box getDelegate() {
return null;
}
public KBox(@org.jetbrains.annotations.NotNull()
androidx.annotation.Box delegate) {
super();
}
@androidx.annotation.RecentlyNullable()
@java.lang.Override()
public java.lang.String foo() {
return null;
}
}