Annotation Interface DuplicateCode


@Retention(SOURCE) @Target({TYPE,METHOD,CONSTRUCTOR,FIELD}) public @interface DuplicateCode
Indicates that the annotated class, method, constructor, or field is a duplication of another part of the code. This can be used to mark areas of the codebase that require refactoring or special attention.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional comment to explain more about the duplication, e.g., where the original code is or why this duplication exists.
    A reference to the original occurrence of the code to help in tracking and managing duplicates.
  • Element Details

    • comment

      String comment
      Optional comment to explain more about the duplication, e.g., where the original code is or why this duplication exists.
      Default:
      ""
    • reference

      String reference
      A reference to the original occurrence of the code to help in tracking and managing duplicates.
      Default:
      ""