Drop loading Java annotation methods as functions

This commit is contained in:
Yan Zhulanow
2015-10-15 16:27:11 +03:00
parent 25b40455ad
commit 9ae3b0fa9c
81 changed files with 30 additions and 409 deletions
@@ -1,6 +0,0 @@
// "Replace method call with property access" "true"
// WITH_RUNTIME
fun foo(ann: Ann) {
ann.value
}
@@ -1,3 +0,0 @@
public @interface Ann {
int value();
}
@@ -1,6 +0,0 @@
// "Replace method call with property access" "true"
// WITH_RUNTIME
fun foo(ann: Ann) {
ann.value()<caret>
}
@@ -1,32 +0,0 @@
// "Replace deprecated method calls with property access in current file" "true"
// WITH_RUNTIME
class A {
fun foo() {}
}
fun bar(x: Int) {
javaClass<A>().getAnnotation(javaClass<Ann>()).args[0]
javaClass<A>().getAnnotation(javaClass<Ann>()).y
}
fun foo(ann: Ann, a: A) {
ann.value
bar(ann.x + (ann).y)
a.foo()
a.equals(a)
a.toString()
a.hashCode()
class Local {
val prop = ann.arg
fun baz() {
val v = ann.args
val summ = ann.x * ann.ext()
}
fun Ann.ext(): Int = -y
}
}
@@ -1,7 +0,0 @@
public @interface Ann {
Class<?> value();
int x() default 1;
int y() default 2;
Class<?> arg() default String;
Class<?>[] args() default {};
}
@@ -1,32 +0,0 @@
// "Replace deprecated method calls with property access in current file" "true"
// WITH_RUNTIME
class A {
fun foo() {}
}
fun bar(x: Int) {
javaClass<A>().getAnnotation(javaClass<Ann>()).args()[0]
javaClass<A>().getAnnotation(javaClass<Ann>()).y()
}
fun foo(ann: Ann, a: A) {
ann.value()<caret>
bar(ann.x() + (ann).y())
a.foo()
a.equals(a)
a.toString()
a.hashCode()
class Local {
val prop = ann.arg()
fun baz() {
val v = ann.args()
val summ = ann.x() * ann.ext()
}
fun Ann.ext(): Int = -y()
}
}