public Element simulate ( final List < Element > arguments , final List < Instruction > instructions , final MethodIdentifier identifier ) { // prevent infinite loops on analysing recursion if ( EXECUTED_PATH_METHODS . contains ( identifier ) ) return new Element ( ) ; lock . lock ( ) ; EXECUTED_PATH_METHODS . add ( identifier ) ; try { injectArguments ( arguments , identifier ) ; return simulateInternal ( instructions ) ; } finally { EXECUTED_PATH_METHODS . remove ( identifier ) ; lock . unlock ( ) ; } }
Simulates the instructions of the method which will be called with the given arguments .