@Generated Annotation, how do we use it?

Blood-HaZaRd picture Blood-HaZaRd · May 7, 2012 · Viewed 25.6k times · Source

I recently read an article talking about the Java annotations, and on this latter comes the @Generated one. They say that it is used for automatically generate code.

Could someone explain me that in further with a little example ?

All what i found on the net was some pro question or something beyond what i was looking for.

Answer

Seshagiri picture Seshagiri · May 7, 2012

As per the JavaDoc:

The Generated annoation is used to mark source code that has been generated. It can also be used to differentiate user written code from generated code in a single file.