Class JavaFile
java.lang.Object
org.matwoess.jsourceprofiler.tool.model.JavaFile
- All Implemented Interfaces:
Serializable
Model class representing a java file.
Stores the package name, the top level classes and the found blocks.
It also stores the source file path and the relative path to the sources root.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of all classes in this file, including inner classes recursively.
-
Field Details
-
beginOfImports
public int beginOfImports -
packageName
-
topLevelClasses
-
foundBlocks
-
sourceFile
-
relativePath
-
-
Constructor Details
-
JavaFile
Creates a new JavaFile object based on a source file path and its parent root directory path.The given source file will be stored as-is while the directory will be used to determine a relative path between the directory and this source file. This relative path is important to mirror the original project structure in the instrumented directory and for the report file hierarchy.
- Parameters:
sourceFile- the source file pathsourcesDir- the top-level sources root directory
-
JavaFile
LikeJavaFile(Path, Path)but relative to the current working directory. The relative path will be set to the file name itself.
-
-
Method Details
-
getClassesRecursive
Returns a list of all classes in this file, including inner classes recursively.- Returns:
- the list of all classes in this file
-