File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Java Annotations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Annotations" Watch "Java Annotations" New topic

Java Annotations

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492

Am new to java annotations. There anyway I can add flag based annotations. In case if I want to change or remove some annotations I can do that by changing the flag and not by changing the code.
Please help
Rob Spoor

Joined: Oct 27, 2005
Posts: 19541

No, annotations and their values are always part of the source code. The values must be compile time constants as well - String literals, primitives, enums or Class objects.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Java Annotations
Similar Threads
why can't we use Annotation for when we Creating a Java Stand-Alone Client
[JSF 2] @javax.faces.bean.ManagedBean or @javax.inject.Named ?
Inifinite Loop
Hiding images bound to sliders
Xml based configration Vs Annotation