Generated
Indicates that an element was auto-generated by a tool or code generator.
This annotation marks code elements that should not be manually modified because they are automatically generated and may be overwritten during regeneration. It helps developers distinguish between handwritten and generated code.
Common use cases:
Code generated by annotation processors
ORM entity classes from database schemas
API client code from OpenAPI specifications
Protocol buffer generated classes
Example usage:
@Generated(value = "protoc", date = "2024-01-15T10:30:00Z")
class UserProto {
// Generated protocol buffer code - do not modify
}
@Generated(value = "annotation-processor", date = "2024-01-15")
object UserApiClient {
// Generated API client code - do not modify
}Content copied to clipboard
Parameters
value
The name of the tool or generator that created the code (e.g., "protoc", "openapi-generator").
date
The generation timestamp in ISO format or other readable format.