Browse Source

Annotations: Annotate generated classes as @Generated

pull/270/head
weisj 3 years ago
parent
commit
87726ff7be
No known key found for this signature in database
GPG Key ID: 31124CB75461DA2A
  1. 1
      annotations-processor/src/main/java/com/github/weisj/darklaf/annotations/processor/SynthesiseLafProcessor.java
  2. 4
      annotations/build.gradle.kts

1
annotations-processor/src/main/java/com/github/weisj/darklaf/annotations/processor/SynthesiseLafProcessor.java

@ -64,6 +64,7 @@ public class SynthesiseLafProcessor extends AbstractProcessor {
builder.append(" * @deprecated Auto-Generated class. Use LafManager.installTheme(Theme) instead.\n");
builder.append(" */\n");
builder.append("@Deprecated\n");
builder.append("@javax.annotation.Generated(value = {\"").append(getClass().getName()).append("\"})\n");
builder.append("public class ").append(synthesisedClassName).append(" extends ").append(baseClassName);
builder.append(" {\n\n");
builder.append(IDENT).append("public ").append(synthesisedClassName).append("() {\n");

4
annotations/build.gradle.kts

@ -2,3 +2,7 @@ plugins {
`java-library`
`module-info-compile`
}
dependencies {
api(libs.javaxAnnotations)
}

Loading…
Cancel
Save