Good evening ladies and gentlemen,
can somebody tell me where exactly the java sematic error comes from in the following pice of code? (The right side is valid)
[tr][td]
import java.lang.annotation.Repeatable;
public class Foo<T> {
@Repeatable(Bars.class)
public static @interface Bar {
String value();
}
public static @interface Bars {
Bar[] value();
}
}
[/td][td]
import java.lang.annotation.Repeatable;
public class Foo {
@Repeatable(Bars.class)
public static @interface Bar {
String value();
}
public static @interface Bars {
Bar[] value();
}
}
[/td][/tr]
The left sniped bails with: [quote]The value method in the container annotation type @Foo.Bars must be of type Foo.Bar[] but is Foo.Bar[] (line 5)
[/quote]
Are there probably places in java where I would see the same behaviour?
-ClaasJG