Hi again,
I'm still playing around with Java annotations in Xtend and stumbled upon the next issue.
I'm trying to create an anomymous instance of my annotation like this:
annotation MyConfiguration{
String name = 'osgi'
}
class InstanceTest{
def doSomething(){
var MyConfiguration config = new MyConfiguration(){
override annotationType(){
null
}
override name(){
null
}
}
}
}
where Xtend complains about not being able to resolve MyConfiguration, although I imported it.
In plain Java everything works fine:
public @interface MyConfiguration {
public String name() default "osgi";
}
public class InstanceTest{
public MyConfiguration doSomething() {
MyConfiguration config = new MyConfiguration() {
@Override
public Class<? extends Annotation> annotationType() {
return null;
}
@Override
public String name() {
return null;
}
};
}
}
Kind regards,
Thomas