Skip to content

Update Javadoc for libcobj/ui#825

Merged
yutaro-sakamoto merged 1 commit intoopensourcecobol:developfrom
tsh-hashimoto:doc/javadoc-ui
Apr 17, 2026
Merged

Update Javadoc for libcobj/ui#825
yutaro-sakamoto merged 1 commit intoopensourcecobol:developfrom
tsh-hashimoto:doc/javadoc-ui

Conversation

@tsh-hashimoto
Copy link
Copy Markdown
Contributor

#787 に関する修正

概要

libcobj/ui パッケージのJavadocを整備した。
TODO: 準備中 となっていた各クラス・メソッドのJavadocを、実装内容に基づいた具体的な説明に置き換えた。

変更点

CobolCallResult.java

  • クラスのJavadocを追加(CALL文の結果を保持する基底クラスであること、サブクラスでのオーバーライドの仕組み、対応しない型へのアクセス時の例外スローについて記載)
  • getInt(), getDouble(), getString()@return, @throws を具体化

CobolResultInt.java

  • クラスのJavadocを追加(int型の結果を保持するサブクラスである旨を記載)
  • コンストラクタの @param を具体化
  • オーバーライドメソッドに {@inheritDoc} を適用

CobolResultDouble.java

  • クラスのJavadocを追加(double型の結果を保持するサブクラスである旨を記載)
  • コンストラクタの @param を具体化
  • オーバーライドメソッドに {@inheritDoc} を適用

CobolResultString.java

  • クラスのJavadocを追加(String型の結果を保持するサブクラスである旨を記載)
  • コンストラクタの @param を具体化
  • オーバーライドメソッドに {@inheritDoc} を適用

CobolResultSet.java

  • クラスのJavadocを追加(リターンコードと複数の結果を保持し、1始まりのインデックスでアクセスできる旨を記載)
  • コンストラクタの @param を具体化
  • getReturnCode()@return を具体化
  • getString(int), getInt(int), getDouble(int)@param, @return, @throws を具体化(インデックスの範囲外と型の不一致の両方の例外条件を記載)

CobolResultSetException.java

  • クラスのJavadocを追加(不正なアクセス時にスローされる例外である旨を記載)
  • コンストラクタの @param を具体化

その他

  • 既存のコードの動作に変更はない。

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Javadoc for the libcobj/ui package (per Issue #787), replacing TODO: 準備中 placeholders with documentation that reflects the current implementation behavior, without changing runtime logic.

Changes:

  • Added/expanded class-level Javadoc for CobolCallResult, its typed subclasses, CobolResultSet, and CobolResultSetException.
  • Clarified @param, @return, and @throws tags for result accessors (including 1-based indexing semantics in CobolResultSet).
  • Applied {@inheritDoc} to overridden getters in typed result subclasses.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolCallResult.java Documents base result type and exception behavior for unsupported getters.
libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultInt.java Adds class/constructor Javadoc and uses {@inheritDoc} for getInt().
libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultDouble.java Adds class/constructor Javadoc and uses {@inheritDoc} for getDouble().
libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultString.java Adds class/constructor Javadoc and uses {@inheritDoc} for getString().
libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultSet.java Documents return code + multi-result access with 1-based index and clarifies throws conditions.
libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultSetException.java Documents when the exception is thrown and clarifies constructor parameter meaning.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tsh-hashimoto
Copy link
Copy Markdown
Contributor Author

Code review

指摘事項はありません。バグおよび CLAUDE.md 準拠性を確認しました。

補足: libcobj/ui パッケージの Javadoc が実装と整合していることを確認しました (例: CobolResultSet の 1 始まりインデックスのチェックは

private void checkIndexInValidRange(int index) throws CobolResultSetException {
if (results.length == 0 || index < 1 || this.results.length < index) {
throw new CobolResultSetException("The index is out of range.");
}
}
と一致)。

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@tsh-hashimoto tsh-hashimoto marked this pull request as ready for review April 17, 2026 05:38
@yutaro-sakamoto yutaro-sakamoto merged commit 5a11413 into opensourcecobol:develop Apr 17, 2026
544 of 588 checks passed
@yutaro-sakamoto yutaro-sakamoto mentioned this pull request Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants