Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Java in General
question with anotations
Hendra Kurniawan
Ranch Hand
Posts: 239
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have this:
public interface InterfaceA{ @first @second int doSomething(); }
then:
public class classA implements InterfaceA{ @Override public int doSomething(){ //do something } }
surprisingly doSomething.getAnotations returned null. What's wrong?
Rob Spoor
Sheriff
Posts: 22821
132
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Are the annotations themselves annotated with
@Retention(RetentionPolicy.RUNTIME)
? Because if they aren't (and @Override isn't, it has RetentionPolicy.SOURCE), they will not be found at runtime through reflection.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
Are you here to take over the surface world? Because this tiny ad will stop you!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
deadly diamond of death syndrome :)
Cyclic class
Java beginner- interface
q on interfaces from overalltesting.com
Interface
More...