• Post Reply Bookmark Topic Watch Topic
  • New Topic

question with anotations  RSS feed

 
Hendra Kurniawan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this:


then:



surprisingly doSomething.getAnotations returned null. What's wrong?
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!