custom annotations in eclipse are not working

Discussion in 'Java' started by Franz, Jan 14, 2008.

  1. Franz

    Franz Guest

    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
    Franz, Jan 14, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Efy.
    Replies:
    1
    Views:
    530
    Nicole Calinoiu
    Sep 22, 2003
  2. Replies:
    3
    Views:
    543
    Chris Uppal
    Jan 25, 2005
  3. Stefan Ram

    Jalopy does not format annotations

    Stefan Ram, Sep 26, 2005, in forum: Java
    Replies:
    2
    Views:
    573
    Roedy Green
    Sep 26, 2005
  4. david.karr
    Replies:
    22
    Views:
    674
    Arne Vajhøj
    Aug 30, 2009
  5. Sebastian
    Replies:
    3
    Views:
    544
    Sebastian
    Dec 19, 2012
Loading...

Share This Page