Search code examples
javagenerated

@Generated Annotation, how do we use it?


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.


Solution

  • 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.