Skip to content

Docs: Add Javadoc Comments to Public Methods in Command.java #9#37

Merged
anshumanjadiya1102 merged 2 commits into
Drive-for-Java:mainfrom
thidaskaveesha:doc/command
Oct 15, 2025
Merged

Docs: Add Javadoc Comments to Public Methods in Command.java #9#37
anshumanjadiya1102 merged 2 commits into
Drive-for-Java:mainfrom
thidaskaveesha:doc/command

Conversation

@thidaskaveesha

@thidaskaveesha thidaskaveesha commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

This pull request adds comprehensive Javadoc comments to the Command.java interface and related command classes to improve readability and maintainability.

The documentation provides clear explanations for,

  • The purpose of the Command interface.

  • The parameters and expected behavior of the execute() method.

  • How the interface relates to commands like find, date, and time.

These comments will help new contributors and users understand the structure and usage of commands in the MyCMD project more easily.

Changes Made

  • Added Javadoc comments to Command.java.

  • Documented execute() parameters (args and context).

  • Enhanced clarity for commands implementing Command (e.g., FindCommand, DateCommand, and TimeCommand).

Why This Is Needed

  • Improves code clarity and maintainability.

  • Makes the project more beginner-friendly.

  • Enhances IDE hover documentation and API visibility.

  • Supports open-source documentation best practices.

Labels

hacktoberfest hacktoberfest2025 hacktoberfest-accepted documentation

Checklist

  • Added meaningful Javadoc comments

  • Verified formatting and consistency

  • No functional or logic changes made

  • Ready for review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds comprehensive Javadoc documentation to the Command interface and all command implementation classes in the MyCMD shell project. The documentation improves code readability and provides clear API guidance for developers.

  • Added detailed Javadoc comments to the Command interface explaining its purpose and the execute() method
  • Documented all command classes with usage examples, parameter descriptions, and behavioral notes
  • Enhanced developer experience with IDE hover documentation and clearer API contracts

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.

File Description
src/main/java/com/mycmd/Command.java Added interface-level and method-level Javadoc with parameter documentation
src/main/java/com/mycmd/commands/*.java Added class-level Javadoc to all 22 command implementations with usage examples

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

* Usage: dir
*
* Output format:
* - Directories: angle-bracket-DIR-angle-bracket followed by directory name

Copilot AI Oct 14, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] The description 'angle-bracket-DIR-angle-bracket' is unclear. Consider using a more descriptive format like 'Directories:

followed by directory name' or 'Directories: [DIR] followed by directory name'.

Suggested change
* - Directories: angle-bracket-DIR-angle-bracket followed by directory name
* - Directories: <DIR> followed by directory name

Copilot uses AI. Check for mistakes.
Comment thread src/main/java/com/mycmd/Command.java
@anshumanjadiya1102 anshumanjadiya1102 merged commit bea6704 into Drive-for-Java:main Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest This is for Hacktoberfest hacktoberfest-accepted This is for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants