Annotations on annotation properties are not working

19 views
Skip to first unread message

Thomas Driessen

unread,
Apr 26, 2017, 4:53:02 AM4/26/17
to Xtend Programming Language
Hi,

I'm currently writing an application with OSGi and there's the case where I need to annotate the property of an annotation with another annotation:

@ObjectClassDefinition
annotation MyConfiguration{

    @AttributeDefinition
    String someProp = 'test'

}

Xtend complains about "The annotation @AttributeDefinition is disallowed for this location", but if I modify the generated Java file there is no error shown:

@ObjectClassDefinition
public @interface MyConfiguration {

    @AttributeDefinition
    public String someProp() default "test";

}

Is this an intended behaviour?

Kind regards,
Thomas

Christian Dietrich

unread,
Apr 27, 2017, 4:56:33 AM4/27/17
to Xtend Programming Language
Hi,

how do these annotations look like?
maybe these are of @Target TYPE_USE

https://bugs.eclipse.org/bugs/show_bug.cgi?id=506374

Thomas Driessen

unread,
Apr 28, 2017, 8:22:21 AM4/28/17
to Xtend Programming Language

Christian Dietrich

unread,
Apr 28, 2017, 8:28:32 AM4/28/17
to Xtend Programming Language
Can you please file a bug for this as well


Reply all
Reply to author
Forward
0 new messages