Java annotation: Difference between revisions

Content deleted Content added
Stagalj (talk | contribs)
Clarification of the introductory paragraph
Line 1:
In [[computer programming]], aannotations '''Javaprovide annotation'''data isabout a way of adding [[metadata]] to Java [[source code]]program that canis alsonot bepart available toof the programmerprogram at [[run-time]]itself. ManyThey timeshave itno isdirect usedeffect ason anthe alternativeoperation toof the code [[XML]]they technologyannotate.
 
Annotations have a number of uses; the most visible among them are:
Java annotations can be added to program elements such as classes, methods, fields, parameters, local variables, and packages. Unlike tags added to Java documentation and processed with tools such as [[XDoclet]], Java annotations are completely accessible to the programmer while the software is running using [[reflection (programming)|reflection]].
 
* Information for the compiler — used by the compiler to detect errors or suppress warnings.
 
* Compiler-time and deployment-time processing — annotation processor can process annotation information to generate code, XML files, and so forth.
 
* Runtime processing — some annotations are available to be examined at runtime.
 
Java annotationsAnnotations can be addedapplied to a program's elementsdeclarations such asof classes, methods, fields, parametersmethods, localand variables,other andprogram packageselements. Unlike tags added to Java documentation and processed with tools such as [[XDoclet]], Java annotations are completely accessible to the programmer while the software is running using [[reflection (programming)|reflection]].
 
==History==