Java: Provide completion for arguments of Class.getAnnotation() and Class.getConstructor(), tests added (IDEA-167250)

This commit is contained in:
Pavel Dolgov
2017-02-10 13:05:28 +03:00
parent ece87efcca
commit 24e71dc952
21 changed files with 567 additions and 147 deletions
@@ -0,0 +1,7 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Class<Annotation> aType = Baz.class;
Test.class.getAnnotation(<caret>);
}
}
@@ -0,0 +1,7 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Class<Annotation> aType = Baz.class;
Test.class.getAnnotation(Bar.class);
}
}
@@ -0,0 +1,6 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Test.class.getAnnotationsByType(<caret>);
}
}
@@ -0,0 +1,6 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Test.class.getAnnotationsByType(Bar.class);
}
}
@@ -0,0 +1,6 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Construct.class.getConstructor(<caret>);
}
}
@@ -0,0 +1,6 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Construct.class.getConstructor(int.class, String.class);
}
}
@@ -0,0 +1,6 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Test.class.getDeclaredAnnotation(<caret>);
}
}
@@ -0,0 +1,6 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Test.class.getDeclaredAnnotation(Bar.class);
}
}
@@ -0,0 +1,6 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Test.class.getDeclaredAnnotationsByType(<caret>);
}
}
@@ -0,0 +1,6 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Test.class.getDeclaredAnnotationsByType(Foo.class);
}
}
@@ -0,0 +1,6 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Construct.class.getDeclaredConstructor(<caret>);
}
}
@@ -0,0 +1,6 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Construct.class.getDeclaredConstructor();
}
}
@@ -0,0 +1,7 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Class<Annotation> aType = Baz.class;
Test.class.getAnnotation(<caret>);
}
}
@@ -0,0 +1,7 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Class<Annotation> aType = Baz.class;
Test.class.getAnnotation(Foo.class);
}
}
@@ -0,0 +1,6 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Test.class.getDeclaredAnnotation(<caret>);
}
}
@@ -0,0 +1,6 @@
import foo.bar.*;
class Main {
void foo() throws ReflectiveOperationException {
Test.class.getDeclaredAnnotation(Foo.class);
}
}