public void compileBatch ( String [ ] files ) throws IOException , ClassNotFoundException { if ( _compileParent ) { try { if ( _loader instanceof Make ) ( ( Make ) _loader ) . make ( ) ; } catch ( Exception e ) { throw new IOException ( e ) ; } } if ( files . length == 0 ) return ; // only batch a number of files at a time int batchCount = _maxBatch ; if ( batchCount < 0 ) batchCount = Integer . MAX_VALUE / 2 ; else if ( batchCount == 0 ) batchCount = 1 ; IOException exn = null ; ArrayList < String > uniqueFiles = new ArrayList < String > ( ) ; for ( int i = 0 ; i < files . length ; i ++ ) { if ( ! uniqueFiles . contains ( files [ i ] ) ) uniqueFiles . add ( files [ i ] ) ; } files = new String [ uniqueFiles . size ( ) ] ; uniqueFiles . toArray ( files ) ; LineMap lineMap = null ; _compilerService . compile ( this , files , lineMap ) ; /* synchronized (LOCK) { for (int i = 0; i < files.length; i += batchCount) { int len = files.length - i; len = Math.min(len, batchCount); String []batchFiles = new String[len]; System.arraycopy(files, i, batchFiles, 0, len); Arrays.sort(batchFiles); try { compileInt(batchFiles, null); } catch (IOException e) { if (exn == null) exn = e; else log.log(Level.WARNING, e.toString(), e); } } } if (exn != null) throw exn; */ }
Compiles a batch list of classes .