◆ checkClassPath()
void ppt4j.util.AspectUtils.checkClassPath |
( |
String | prepatchPath, |
|
|
String | postpatchPath, |
|
|
String | classPath ) |
This method is a before advice that intercepts calls to the get method of ExtractorFactory class, specifically when the arguments passed are prepatchPath, postpatchPath, and classPath. It checks if the specified classPath is present in the current Virtual Machine's class path by calling the VMUtils.checkVMClassPathPresent method.
◆ init()
void ppt4j.util.AspectUtils.init |
( |
| ) |
|
This method is executed before any method with a signature of void main(String[])
. It initializes properties by loading properties from a resource file and initializing them.
◆ logDownload()
Object ppt4j.util.AspectUtils.logDownload |
( |
ProceedingJoinPoint | point | ) |
throws Throwable |
A logging advice method that intercepts the execution of the download method in DiffParser class. It measures the time taken to download a file, calculates the file size in KB, and the average download speed in KB/s.
- Parameters
-
point | the ProceedingJoinPoint object representing the joinpoint at which this advice is being applied |
- Returns
- the byte array result of the download method
- Exceptions
-
Throwable | if an error occurs during the method execution |
◆ logTime()
Object ppt4j.util.AspectUtils.logTime |
( |
ProceedingJoinPoint | point | ) |
throws Throwable |
This method is an aspect that intercepts method calls annotated with @MethodProfiler and logs the time taken for the method to execute.
- Parameters
-
point | the ProceedingJoinPoint representing the method being intercepted |
- Returns
- the result of the intercepted method
- Exceptions
-
Throwable | if an error occurs during method execution |
◆ postPropertyInit()
void ppt4j.util.AspectUtils.postPropertyInit |
( |
| ) |
|
This method is an advice that runs after the execution of the init method in PropertyUtils class. It calls the init method of LibraryConstants class.
◆ printAnalysis()
void ppt4j.util.AspectUtils.printAnalysis |
( |
boolean | result | ) |
|
This method is executed after the "analyze" method of PatchAnalyzer class is called. It logs the result of the analysis, indicating whether a patch is present or not.
- Parameters
-
result | the boolean result of the analysis indicating if a patch is present or not |
◆ printReturnValue()
void ppt4j.util.AspectUtils.printReturnValue |
( |
int | ret | ) |
|
This method is executed after a method join() in ExecDriver class is successfully executed. It logs the return value of the join() method along with a message indicating that the forked process exited.
- Parameters
-
ret | The return value of the join() method |
◆ promptFork()
void ppt4j.util.AspectUtils.promptFork |
( |
String | cmd | ) |
|
Forks a process to execute the specified command.
- Parameters
-
cmd | the command to be executed |
The documentation for this class was generated from the following file: