custom annotations in eclipse are not working

F

Franz

Hi,

I use custom annotation, but eclipse WTP 3.0M4 says "cannot be
resolved to a type". But the strange thing, is that it only occurs on
annotation, which has variables. (FYI: I can still build it with
maven, so it's not a programming error)

For example I have this annotation:
@XmlNode(tagName = "test")
public final class test { ... }

The corresponding annotation-interface is:
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface XmlNode {
String namespaceUri() default "http://www.test.com/test";
String namespacePrefix() default "test";
String tagName();
}

I enabled Annotation Processing in Project Properties. Why throws
eclipse the error "cannot be resolved to a type" and how can I fix it?

Thanks in advance,
Franz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top