Wrapped annotations test data so it will be processed by namespace comparator correctly.

This commit is contained in:
Evgeny Gerashchenko
2013-03-11 17:02:06 +04:00
parent 0f5de451ec
commit f23327458f
18 changed files with 257 additions and 71 deletions
@@ -1,35 +1,38 @@
package test;
@interface MyAnnotationWithParam {
MyAnnotation value();
}
public interface AnnotationWithAnnotationInParam {
@interface MyAnnotation {
String value();
}
public @interface MyAnnotationWithParam {
MyAnnotation value();
}
@MyAnnotationWithParam(@MyAnnotation("test"))
class A {}
public @interface MyAnnotation {
String value();
}
@interface MyAnnotation2 {
String[] value();
}
@MyAnnotationWithParam(@MyAnnotation("test"))
public class A {}
@interface MyAnnotationWithParam2 {
MyAnnotation2 value();
}
public @interface MyAnnotation2 {
String[] value();
}
@MyAnnotationWithParam2(@MyAnnotation2({"test", "test2"}))
class B {}
public @interface MyAnnotationWithParam2 {
MyAnnotation2 value();
}
@interface MyAnnotation3 {
String first();
String second();
}
@MyAnnotationWithParam2(@MyAnnotation2({"test", "test2"}))
public class B {}
@interface MyAnnotationWithParam3 {
MyAnnotation3 value();
}
public @interface MyAnnotation3 {
String first();
String second();
}
@MyAnnotationWithParam3(@MyAnnotation3(first = "f", second = "s"))
class C {}
public @interface MyAnnotationWithParam3 {
MyAnnotation3 value();
}
@MyAnnotationWithParam3(@MyAnnotation3(first = "f", second = "s"))
public class C {}
}
@@ -0,0 +1,47 @@
package test
public trait AnnotationWithAnnotationInParam : java.lang.Object {
test.AnnotationWithAnnotationInParam.MyAnnotationWithParam(value = MyAnnotation[value = "test"]: test.AnnotationWithAnnotationInParam.MyAnnotation) public open class A : java.lang.Object {
public constructor A()
}
test.AnnotationWithAnnotationInParam.MyAnnotationWithParam2(value = MyAnnotation2[value = ["test", "test2"]]: test.AnnotationWithAnnotationInParam.MyAnnotation2) public open class B : java.lang.Object {
public constructor B()
}
test.AnnotationWithAnnotationInParam.MyAnnotationWithParam3(value = MyAnnotation3[first = "f", second = "s"]: test.AnnotationWithAnnotationInParam.MyAnnotation3) public open class C : java.lang.Object {
public constructor C()
}
public final annotation class MyAnnotation : jet.Annotation {
public constructor MyAnnotation(/*0*/ value : jet.String?)
public abstract fun value() : jet.String?
}
public final annotation class MyAnnotation2 : jet.Annotation {
public constructor MyAnnotation2(/*0*/ vararg value : jet.String? /*jet.Array<jet.String>?*/)
public abstract fun value() : jet.Array<jet.String>?
}
public final annotation class MyAnnotation3 : jet.Annotation {
public constructor MyAnnotation3(/*0*/ first : jet.String?, /*1*/ second : jet.String?)
public abstract fun first() : jet.String?
public abstract fun second() : jet.String?
}
public final annotation class MyAnnotationWithParam : jet.Annotation {
public constructor MyAnnotationWithParam(/*0*/ value : test.AnnotationWithAnnotationInParam.MyAnnotation?)
public abstract fun value() : test.AnnotationWithAnnotationInParam.MyAnnotation?
}
public final annotation class MyAnnotationWithParam2 : jet.Annotation {
public constructor MyAnnotationWithParam2(/*0*/ value : test.AnnotationWithAnnotationInParam.MyAnnotation2?)
public abstract fun value() : test.AnnotationWithAnnotationInParam.MyAnnotation2?
}
public final annotation class MyAnnotationWithParam3 : jet.Annotation {
public constructor MyAnnotationWithParam3(/*0*/ value : test.AnnotationWithAnnotationInParam.MyAnnotation3?)
public abstract fun value() : test.AnnotationWithAnnotationInParam.MyAnnotation3?
}
}
@@ -3,7 +3,10 @@ package test;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.CONSTRUCTOR})
@interface targetAnnotation {
String value();
public interface AnnotationWithArrayOfEnumInParam {
@Target({ElementType.FIELD, ElementType.CONSTRUCTOR})
public @interface targetAnnotation {
String value();
}
}
@@ -0,0 +1,9 @@
package test
public trait AnnotationWithArrayOfEnumInParam : java.lang.Object {
java.lang.annotation.Target(value = [ElementType.FIELD, ElementType.CONSTRUCTOR]: jet.Array<java.lang.annotation.ElementType>?) public final annotation class targetAnnotation : jet.Annotation {
public constructor targetAnnotation(/*0*/ value : jet.String?)
public abstract fun value() : jet.String?
}
}
@@ -1,14 +1,16 @@
package test;
import java.lang.String;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@interface MyAnnotation {
String[] value();
}
public interface AnnotationWithArrayOfStringInParam {
@MyAnnotation({"a", "b", "c"})
class A {
public @interface MyAnnotation {
String[] value();
}
@MyAnnotation({"a", "b", "c"})
public class A {
}
}
@@ -0,0 +1,13 @@
package test
public trait AnnotationWithArrayOfStringInParam : java.lang.Object {
test.AnnotationWithArrayOfStringInParam.MyAnnotation(value = ["a", "b", "c"]: jet.Array<jet.String>?) public open class A : java.lang.Object {
public constructor A()
}
public final annotation class MyAnnotation : jet.Annotation {
public constructor MyAnnotation(/*0*/ vararg value : jet.String? /*jet.Array<jet.String>?*/)
public abstract fun value() : jet.Array<jet.String>?
}
}
@@ -1,14 +1,16 @@
package test;
import java.lang.String;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@interface MyAnnotation {
String[] value();
}
public interface AnnotationWithEmptyArrayInParam {
@MyAnnotation({})
class A {
public @interface MyAnnotation {
String[] value();
}
@MyAnnotation({})
public class A {
}
}
@@ -0,0 +1,13 @@
package test
public trait AnnotationWithEmptyArrayInParam : java.lang.Object {
test.AnnotationWithEmptyArrayInParam.MyAnnotation(value = []: jet.Array<jet.String>?) public open class A : java.lang.Object {
public constructor A()
}
public final annotation class MyAnnotation : jet.Annotation {
public constructor MyAnnotation(/*0*/ vararg value : jet.String? /*jet.Array<jet.String>?*/)
public abstract fun value() : jet.Array<jet.String>?
}
}
@@ -3,7 +3,10 @@ package test;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
@interface retentionAnnotation {
String value();
public interface AnnotationWithEnumInParam {
@Retention(RetentionPolicy.RUNTIME)
public @interface RetentionAnnotation {
String value();
}
}
@@ -0,0 +1,9 @@
package test
public trait AnnotationWithEnumInParam : java.lang.Object {
java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) public final annotation class RetentionAnnotation : jet.Annotation {
public constructor RetentionAnnotation(/*0*/ value : jet.String?)
public abstract fun value() : jet.String?
}
}
@@ -1,12 +1,15 @@
package test;
@MyAnnotation(MyEnum.ONE)
class MyTest {}
public interface CustomAnnotation {
@interface MyAnnotation {
MyEnum value();
}
@MyAnnotation(MyEnum.ONE)
public class MyTest {}
enum MyEnum {
ONE
public @interface MyAnnotation {
MyEnum value();
}
public enum MyEnum {
ONE
}
}
@@ -0,0 +1,29 @@
package test
public trait CustomAnnotation : java.lang.Object {
public final annotation class MyAnnotation : jet.Annotation {
public constructor MyAnnotation(/*0*/ value : test.CustomAnnotation.MyEnum?)
public abstract fun value() : test.CustomAnnotation.MyEnum?
}
public final enum class MyEnum : jet.Enum<test.CustomAnnotation.MyEnum> {
private constructor MyEnum()
public final override /*1*/ /*fake_override*/ fun name() : jet.String
public final override /*1*/ /*fake_override*/ fun ordinal() : jet.Int
public class object <class-object-for-MyEnum> {
private constructor <class-object-for-MyEnum>()
public final val ONE : test.CustomAnnotation.MyEnum
public final fun valueOf(/*0*/ value : jet.String) : test.CustomAnnotation.MyEnum
public final fun values() : jet.Array<test.CustomAnnotation.MyEnum>
}
}
test.CustomAnnotation.MyAnnotation(value = MyEnum.ONE: test.CustomAnnotation.MyEnum) public open class MyTest : java.lang.Object {
public constructor MyTest()
}
}
package CustomAnnotation {
}
@@ -1,10 +1,12 @@
package test;
@MyAnnotation(first = "f", second = "s")
class MyTest {}
public interface CustomAnnotationWithDefaultParameter {
@interface MyAnnotation {
String first();
String second() default("s");
@MyAnnotation(first = "f", second = "s")
public class MyTest {}
public @interface MyAnnotation {
String first();
String second() default("s");
}
}
@@ -0,0 +1,14 @@
package test
public trait CustomAnnotationWithDefaultParameter : java.lang.Object {
public final annotation class MyAnnotation : jet.Annotation {
public constructor MyAnnotation(/*0*/ first : jet.String?, /*1*/ second : jet.String? = ...)
public abstract fun first() : jet.String?
public abstract fun second() : jet.String?
}
test.CustomAnnotationWithDefaultParameter.MyAnnotation(first = "f": jet.String, second = "s": jet.String) public open class MyTest : java.lang.Object {
public constructor MyTest()
}
}
@@ -1,11 +1,14 @@
package test;
@B(@A("test"))
@interface A {
String value();
}
public interface RecursiveAnnotation {
@B(@A("test"))
@interface B {
A value();
@B(@A("test"))
public @interface A {
String value();
}
@B(@A("test"))
public @interface B {
A value();
}
}
@@ -0,0 +1,14 @@
package test
public trait RecursiveAnnotation : java.lang.Object {
test.RecursiveAnnotation.B(value = A[value = "test"]: test.RecursiveAnnotation.A) public final annotation class A : jet.Annotation {
public constructor A(/*0*/ value : jet.String?)
public abstract fun value() : jet.String?
}
test.RecursiveAnnotation.B(value = A[value = "test"]: test.RecursiveAnnotation.A) public final annotation class B : jet.Annotation {
public constructor B(/*0*/ value : test.RecursiveAnnotation.A?)
public abstract fun value() : test.RecursiveAnnotation.A?
}
}
@@ -1,10 +1,13 @@
package test;
@interface A {
B value();
}
public interface RecursiveAnnotation2 {
@A(@B("test"))
@interface B {
String value();
public @interface A {
B value();
}
@A(@B("test"))
public @interface B {
String value();
}
}
@@ -0,0 +1,14 @@
package test
public trait RecursiveAnnotation2 : java.lang.Object {
public final annotation class A : jet.Annotation {
public constructor A(/*0*/ value : test.RecursiveAnnotation2.B?)
public abstract fun value() : test.RecursiveAnnotation2.B?
}
test.RecursiveAnnotation2.A(value = B[value = "test"]: test.RecursiveAnnotation2.B) public final annotation class B : jet.Annotation {
public constructor B(/*0*/ value : jet.String?)
public abstract fun value() : jet.String?
}
}