International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
|
Volume 16 - Issue 8 |
Published: February 2011 |
Authors: Shiva Prakash, J.P. Saini, R. K. Singh, Karan Singh |
![]() |
Shiva Prakash, J.P. Saini, R. K. Singh, Karan Singh . Features of Annotations and their Applications. International Journal of Computer Applications. 16, 8 (February 2011), 14-21. DOI=10.5120/2034-2391
@article{ 10.5120/2034-2391, author = { Shiva Prakash,J.P. Saini,R. K. Singh,Karan Singh }, title = { Features of Annotations and their Applications }, journal = { International Journal of Computer Applications }, year = { 2011 }, volume = { 16 }, number = { 8 }, pages = { 14-21 }, doi = { 10.5120/2034-2391 }, publisher = { Foundation of Computer Science (FCS), NY, USA } }
%0 Journal Article %D 2011 %A Shiva Prakash %A J.P. Saini %A R. K. Singh %A Karan Singh %T Features of Annotations and their Applications%T %J International Journal of Computer Applications %V 16 %N 8 %P 14-21 %R 10.5120/2034-2391 %I Foundation of Computer Science (FCS), NY, USA
Annotations are descriptive declarative information that can be associated with program elements. They can be used to represent metadata. This is useful in many cases like providing documentation, connecting to database etc. These annotations are later read by the execution environment and appropriate action will be taken. For custom annotations, a process called reflection is used to take necessary action. Although Java introduced this feature recently, attributes / annotations have been a topic of interest for researchers. There are tools and applications which make use of annotations. This paper, we will first have a look at annotations and annotation types. Then we go on to discuss in detail how annotations support injecting dependencies into resources like data sources, mail sources, environment entries, EJBs, web services, and so on. The new features are targeted to shift the responsibility of writing the boilerplate code from the programmer to the compiler or other tools. The resulting code is less likely to be bug-prone.