public void beforeMethodHook ( String hookedClassQualifiedName , String hookedMethodSimpleName , String actualHookedMethodSimpleName ) { if ( currentRunResult != null ) { return ; // maybe called inside of the root method } List < TestMethod > rootMethods = srcTree . getRootMethodTable ( ) . getByName ( hookedClassQualifiedName , hookedMethodSimpleName ) ; if ( rootMethods . size ( ) == 0 ) { return ; // hooked method is not root method } assert rootMethods . size ( ) == 1 ; TestMethod rootMethod = rootMethods . get ( 0 ) ; logger . info ( "beforeMethodHook: " + hookedMethodSimpleName ) ; // initialize current captureNo and runResult currentCaptureNo = 1 ; currentRunResult = new RootMethodRunResult ( ) ; currentRunResult . setRootMethodKey ( rootMethod . getKey ( ) ) ; currentRunResult . setRootMethod ( rootMethod ) ; currentActualRootMethodSimpleName = actualHookedMethodSimpleName ; startMethodTime = System . currentTimeMillis ( ) ; }
initialize runResult information if the method for the arguments is root method