-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from codellm-devkit/102-create-comprehensive-…
…comment-analysis-capabilities Feature Request Issue 102: Enrich comment analysis capabilities
- Loading branch information
Showing
15 changed files
with
1,105 additions
and
334 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package com.ibm.cldk.entities; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* Represents a comment entity extracted from source code. | ||
* This class encapsulates information about the content, position, | ||
* and type of a comment within a source file. | ||
* | ||
* <p> | ||
* The comment can be of various types, including Javadoc, block comments, or line comments. | ||
* The class also keeps track of the comment's position within the file (line and column numbers). | ||
* </p> | ||
* | ||
* <p> | ||
* This class leverages Lombok's {@code @Data} annotation to automatically generate | ||
* getters, setters, {@code toString()}, {@code equals()}, and {@code hashCode()} methods. | ||
* </p> | ||
* | ||
* Example usage: | ||
* <pre> | ||
* Comment comment = new Comment(); | ||
* comment.setContent("This is a sample comment."); | ||
* comment.setStartLine(10); | ||
* comment.setEndLine(12); | ||
* comment.setJavadoc(true); | ||
* </pre> | ||
* | ||
* @author Rahul Krishna | ||
* @version 2.3.0 | ||
*/ | ||
@Data | ||
public class Comment { | ||
|
||
/** | ||
* The textual content of the comment. | ||
*/ | ||
private String content; | ||
|
||
/** | ||
* The starting line number of the comment in the source file. | ||
* <p> | ||
* Defaults to {@code -1} if the position is unknown. | ||
* </p> | ||
*/ | ||
private int startLine = -1; | ||
|
||
/** | ||
* The ending line number of the comment in the source file. | ||
* <p> | ||
* Defaults to {@code -1} if the position is unknown. | ||
* </p> | ||
*/ | ||
private int endLine = -1; | ||
|
||
/** | ||
* The starting column number of the comment in the source file. | ||
* <p> | ||
* Defaults to {@code -1} if the position is unknown. | ||
* </p> | ||
*/ | ||
private int startColumn = -1; | ||
|
||
/** | ||
* The ending column number of the comment in the source file. | ||
* <p> | ||
* Defaults to {@code -1} if the position is unknown. | ||
* </p> | ||
*/ | ||
private int endColumn = -1; | ||
|
||
/** | ||
* Indicates whether the comment is a Javadoc comment. | ||
* <p> | ||
* Javadoc comments are special block comments used for generating documentation | ||
* and typically start with {@code /**}. | ||
* </p> | ||
*/ | ||
private boolean isJavadoc = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.