Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > custom annotations in eclipse are not working

Reply
Thread Tools

custom annotations in eclipse are not working

 
 
Franz
Guest
Posts: n/a
 
      01-14-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seeking info on JAXB and custom annotations Sebastian Java 3 12-19-2012 06:23 PM
What kinds of things could cause a class' annotations to not beavailable? david.karr Java 22 08-30-2009 05:38 PM
Jalopy does not format annotations Stefan Ram Java 2 09-26-2005 02:52 AM
Java Annotations not working ??? chvid@acm.org Java 3 01-25-2005 10:25 AM
codegen:nullValue, Using Annotations with a Typed DataSet, Not resolved never! Efy. ASP .Net 1 09-22-2003 02:50 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57