JavaDescriptorResolver: Add resolve for annotation parameters (array, annotation, enum)

Temporary change testData for LoadJavaTest because enums in parameters of annotations in kotlin files is now unsupported
This commit is contained in:
Natalia.Ukhorskaya
2012-08-29 13:10:03 +04:00
parent 92a782ce6c
commit 19221e3ba6
18 changed files with 883 additions and 30 deletions
@@ -0,0 +1,37 @@
package annotations;
import java.lang.String;
@interface MyAnnotationWithParam {
MyAnnotation value();
}
@interface MyAnnotation {
String value();
}
@MyAnnotationWithParam(@MyAnnotation("test"))
class A {}
@interface MyAnnotation2 {
String[] value();
}
@interface MyAnnotationWithParam2 {
MyAnnotation2 value();
}
@MyAnnotationWithParam2(@MyAnnotation2({"test", "test2"}))
class B {}
@interface MyAnnotation3 {
String first();
String second();
}
@interface MyAnnotationWithParam3 {
MyAnnotation3 value();
}
@MyAnnotationWithParam3(@MyAnnotation3(first = "f", second = "s"))
class C {}
@@ -0,0 +1,9 @@
package annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.CONSTRUCTOR})
@interface targetAnnotation {
String value();
}
@@ -0,0 +1,14 @@
package annotations;
import java.lang.String;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@interface MyAnnotation {
String[] value();
}
@MyAnnotation({"a", "b", "c"})
class A {
}
@@ -0,0 +1,14 @@
package annotations;
import java.lang.String;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@interface MyAnnotation {
String[] value();
}
@MyAnnotation({})
class A {
}
@@ -0,0 +1,9 @@
package annotations;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
@interface retentionAnnotation {
String value();
}
@@ -0,0 +1,12 @@
package annotations;
@MyAnnotation(MyEnum.ONE)
class MyTest {}
@interface MyAnnotation {
MyEnum value();
}
enum MyEnum {
ONE
}
@@ -0,0 +1,10 @@
package annotations;
@MyAnnotation(first = "f", second = "s")
class MyTest {}
@interface MyAnnotation {
String first();
String second() default("s");
}
@@ -0,0 +1,10 @@
package annotations;
import annotations.MyEnum;
@interface MyAnnotation {
MyEnum value();
}
@MyAnnotation(MyEnum.ONE)
class testClass {}
@@ -0,0 +1,6 @@
package annotations
public enum class MyEnum {
ONE
}
@@ -0,0 +1,11 @@
package annotations;
@B(@A("test"))
@interface A {
String value();
}
@B(@A("test"))
@interface B {
A value();
}
@@ -0,0 +1,10 @@
package annotations;
@interface A {
B value();
}
@A(@B("test"))
@interface B {
String value();
}