public class SloccountReport extends FileContainer implements SloccountReportInterface
| Modifier and Type | Field and Description | 
|---|---|
static String | 
DIRECTORY_SEPARATOR
Only Unix directory separator is used in the code. 
 | 
| Constructor and Description | 
|---|
SloccountReport()  | 
SloccountReport(SloccountReport old,
               FileFilter filter)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
add(String filePath,
   String languageName,
   String moduleName,
   int lineCount,
   int commentCount)
Add lines count. 
 | 
void | 
addFolder(Folder folder)  | 
void | 
addLanguage(Language language)  | 
void | 
addModule(Module module)
Add a new module. 
 | 
static String | 
extractFolder(String filePath)
Extract directory part of a path. 
 | 
Folder | 
getFolder(String name)  | 
int | 
getFolderCount()  | 
String | 
getFolderCountString()  | 
List<Folder> | 
getFolders()  | 
Language | 
getLanguage(String name)  | 
int | 
getLanguageCount()  | 
String | 
getLanguageCountString()  | 
List<Language> | 
getLanguages()  | 
File | 
getLongestFile()  | 
Folder | 
getLongestFolder()  | 
Language | 
getLongestLanguage()  | 
Module | 
getLongestModule()
Get the longest module. 
 | 
Module | 
getModule(String name)
Get module using its name. 
 | 
int | 
getModuleCount()
Get count of all modules. 
 | 
String | 
getModuleCountString()
Get count of all modules as string. 
 | 
List<Module> | 
getModules()
Get all modules. 
 | 
String | 
getName()  | 
String | 
getRootFolder()
Get the root folder. 
 | 
void | 
simplifyNames()
Simplify the names. 
 | 
addFile, getCommentCount, getCommentCountString, getFile, getFileCount, getFileCountString, getFiles, getLineCount, getLineCountStringpublic static final String DIRECTORY_SEPARATOR
public SloccountReport()
public SloccountReport(SloccountReport old, FileFilter filter)
public void add(String filePath, String languageName, String moduleName, int lineCount, int commentCount)
SloccountReportInterfaceadd in interface SloccountReportInterfacefilePath - the filelanguageName - the language namemoduleName - the module namelineCount - the line countcommentCount - the comment countpublic static String extractFolder(String filePath)
filePath - the path containing folders and file name, Unix separators '/'
            are expectedpublic int getFolderCount()
public String getFolderCountString()
public int getLanguageCount()
public String getLanguageCountString()
public Module getModule(String name)
name - the module namepublic List<Module> getModules()
public int getModuleCount()
public String getModuleCountString()
public void addFolder(Folder folder)
public void addLanguage(Language language)
public void addModule(Module module)
module - the modulepublic String getRootFolder()
SloccountReportInterfacegetRootFolder in interface SloccountReportInterfacepublic File getLongestFile()
public Folder getLongestFolder()
public Language getLongestLanguage()
public Module getLongestModule()
public void simplifyNames()
Copyright © 2016–2022. All rights reserved.