public static Optional<AnnotationSpec> generatedAnnotationSpec(
      Elements elements, SourceVersion sourceVersion, Class<?> processorClass) {
    return generatedAnnotationSpecBuilder(elements, sourceVersion, processorClass)
        .map(AnnotationSpec.Builder::build);
  }
public static Optional < AnnotationSpec > generatedAnnotationSpec ( Elements elements , SourceVersion sourceVersion , Class < ? > processorClass ) { return generatedAnnotationSpecBuilder ( elements , sourceVersion , processorClass ) . map ( AnnotationSpec . Builder :: build ) ; }
Returns {@code @Generated("processorClass"} for the target {@code SourceVersion}.

<p>Returns {@code javax.annotation.processing.Generated} for JDK 9 and newer, {@code
javax.annotation.Generated} for earlier releases, and Optional#empty()} if the annotation is
not available.