@Generated Annotation, how do we use it?
@Generated
is used by meta-programs such as Auto/Value which generate source code so you don't have to manually write it. If you're writing a .java
file by hand (which is normally what one does), don't use @Generated
.
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.