private ExecJavaCliParser createExecCommandParser ( String containerWorkDir ) { String execLine = this . filterAndExecuteLaunchScriptAndReturnExecLine ( containerWorkDir ) ; String [ ] values = execLine . split ( "\"" ) ; String javaCli = values [ 1 ] ; String [ ] javaCliValues = javaCli . split ( " " ) ; StringBuffer buffer = new StringBuffer ( ) ; for ( int i = 0 ; i < javaCliValues . length ; i ++ ) { if ( i > 0 ) { buffer . append ( javaCliValues [ i ] ) ; if ( javaCliValues . length - i > 1 ) { buffer . append ( " " ) ; } } } String extractedJavaCli = buffer . toString ( ) ; ExecJavaCliParser execJavaCliParser = new ExecJavaCliParser ( extractedJavaCli ) ; return execJavaCliParser ; }
Creates CLI parser which can be used to extract Container s class name and its launch arguments .