github/awesome-copilot

java-docs

Ensure that Java types are documented with Javadoc comments and follow best practices for documentation.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/github/awesome-copilot --skill java-docs

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Java Documentation (Javadoc) Best Practices

Principles

  • Document only what the code actually does: read the implementation, callers and tests first. Never invent behaviour, thresholds, thread-safety, nullability or exceptions you have not verified; if unsure, leave it out or ask.
  • Keep the existing documentation style of the project (language, tag order, comment form /** */ vs ///). Do not rewrite existing comments, or mass-document a codebase, unless the user asks; limit changes to the requested scope.
  • Check the JDK level (maven.compiler.release, toolchain, java -version) before using newer features, and stay within it.

Conventions

  • @since only with the real version in which the API was introduced; @deprecated with a reason and replacement, together with @Deprecated.
  • @author and @version only if the project already uses them.
  • Code blocks, by JDK level:
  • Any JDK: <pre>{@code ... }</pre> (escape @ at line start, balance braces).
  • JDK 18+: {@snippet : ... } for inline code, or {@snippet file="Example.java" region="demo"} with files in snippet-files/ (preferred for examples; javadoc does not compile or validate the snippet source, so compile and test the files in a separate build/test source set if you need that guarantee). Use // @highlight substring="x" and // @replace markup as needed.
  • JDK 23+ only (JEP 467): Markdown doc comments with ///, using [Type#member] for links and fenced code blocks. Use them only if the project already does or the user asks, and the build runs a JDK 23+ javadoc.

Verify

  • Run mvn -q javadoc:javadoc (or ./gradlew javadoc) and for single files javadoc -Xdoclint:all -d target/javadoc-check <files>; fix every warning/error you introduced (missing @param, bad HTML, unresolved {@link}, unknown tags).
  • Report what was documented and the commands run; state any claims you could not verify from the code.
같은 저장소의 Skills

더 많은 Skills

모든 Skills