It's not a secret anymore!
The moose likes Java in General and the fly likes Use of Custom Annotations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Use of Custom Annotations" Watch "Use of Custom Annotations" New topic

Use of Custom Annotations

Ram Chhabra

Joined: Jun 23, 2007
Posts: 23

I am recently looking over that how to make our own custom annotations using Java 5(Tiger).
I have run over that and also created a very simple and basic annotation like below:

Now, i am confused that how to make use of this annotation, like if in another class i have used this annotation like below:

Like i want that something should happen or some check should be done if this annotation is being used in the application, then how to achieve that?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63854

Hint: java.lang.Class

[Asking smart questions] [About Bear] [Books by Bear]
Ram Chhabra

Joined: Jun 23, 2007
Posts: 23
Thanks for the hint.... i am clear on this now ..

I agree. Here's the link:
subject: Use of Custom Annotations
It's not a secret anymore!