Add resolution for JSR 305 type qualifier nicknames

#KT-10942 In Progress
This commit is contained in:
Denis Zharkov
2017-06-06 12:45:14 +03:00
parent 79e14f88e4
commit 5c8f2a8ae8
9 changed files with 236 additions and 5 deletions
+13
View File
@@ -0,0 +1,13 @@
class A {
@javax.annotation.Nullable
String nullable() { return null; }
@javax.annotation.CheckForNull
String checkForNull() { return null; }
@javax.annotation.Nonnull
String nonNull() { return null; }
@javax.annotation.Nonnull(when = javax.annotation.meta.When.ALWAYS)
String nonNullExplicitArgument() { return null; }
}
+6
View File
@@ -0,0 +1,6 @@
class B {
@MyNullable
String myNullable() {
return null;
}
}
@@ -0,0 +1,7 @@
@java.lang.annotation.Documented
@javax.annotation.meta.TypeQualifierNickname
@javax.annotation.CheckForNull
@java.lang.annotation.Target({ElementType.METHOD, ElementType.PARAMETER})
@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
public @interface MyNullable {
}