Package org.machanism.machai.gw.reviewer
Class JavaReviewer
java.lang.Object
org.machanism.machai.gw.reviewer.JavaReviewer
- All Implemented Interfaces:
Reviewer
Reviewer implementation for Java source files (.java).
Extracts guidance information or comments annotated with the
FileProcessor.GUIDANCE_TAG_NAME for documentation input processing,
including support for package-info.java and regular Java files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringextractPackageName(String content) Extracts the package name from the content of a package-info.java file.String[]Returns the file extensions supported by this reviewer.Performs analysis on the specified Java source or package-info file, extracting documentation guidance if marked with the appropriate tag.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.machanism.machai.gw.reviewer.Reviewer
setDirGuidanceMap
-
Constructor Details
-
JavaReviewer
public JavaReviewer()
-
-
Method Details
-
getSupportedFileExtentions
Returns the file extensions supported by this reviewer. This reviewer processes files with extension: java.- Specified by:
getSupportedFileExtentionsin interfaceReviewer- Returns:
- an array of supported file extension strings
-
perform
Performs analysis on the specified Java source or package-info file, extracting documentation guidance if marked with the appropriate tag.- Specified by:
performin interfaceReviewer- Parameters:
projectDir- the root directory of the project for contextguidancesFile- the Java file to be analyzed- Returns:
- formatted documentation guidance or
nullif none found - Throws:
IOException- if an error occurs reading the file
-
extractPackageName
-