Package pl.tfij.test.modulesize
Class ModuleSizeCalculator.ModuleSizeCalculatorBuilder
java.lang.Object
pl.tfij.test.modulesize.ModuleSizeCalculator.ModuleSizeCalculatorBuilder
- Enclosing class:
- ModuleSizeCalculator
The ModuleSizeCalculatorBuilder class provides a fluent API for configuring modules and analyzing projects.
It allows users to specify modules, include file extensions, and analyze the project.
This class is typically used in conjunction with the ModuleSizeCalculator class to configure and perform analysis.
-
Method Summary
Modifier and TypeMethodDescriptionanalyze()Analyzes the modules using the provided configuration and returns a summary of the project.Set the set of file extensions that should be included in the analysis.withDirModule(String path) Adds a directory module to the list of modules for analysis.withModule(String modulePackage) Adds a moduleName package to the list of modules for analysis.
-
Method Details
-
withModule
Adds a moduleName package to the list of modules for analysis.- Parameters:
modulePackage- The package of the moduleName to be added.- Returns:
- The ModuleSizeCalculatorBuilder instance to allow method chaining.
-
withDirModule
Adds a directory module to the list of modules for analysis.- Parameters:
path- The path of the directory module to be added.- Returns:
- The ModuleSizeCalculatorBuilder instance to allow method chaining.
-
include
Set the set of file extensions that should be included in the analysis. If nothing is set, all files will be analyzed. If you want to analyze files without extensions, add an empty string to the list.- Parameters:
fileExtension- Set the set of file extensions that should be included in the analysis- Returns:
- The instance of the builder class on which the method was called.
-
analyze
Analyzes the modules using the provided configuration and returns a summary of the project.- Returns:
- A ProjectSummary instance containing the summary of the analyzed project.
-