private void processFiles() throws CompilationFailedException, IOException, URISyntaxException {
  GroovyShell groovy=new GroovyShell(conf);
  setupContextClassLoader(groovy);
  Script s=groovy.parse(getScriptSource(isScriptFile,script));
  if (args.isEmpty()) {
    BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
    PrintWriter writer=new PrintWriter(System.out);
    try {
      processReader(s,reader,writer);
    }
  finally {
      reader.close();
      writer.close();
    }
  }
 else {
    Iterator i=args.iterator();
    while (i.hasNext()) {
      String filename=(String)i.next();
      File file=huntForTheScriptFile(filename);
      processFile(s,file);
    }
  }
}

private void processFiles ( ) throws CompilationFailedException , IOException , URISyntaxException { GroovyShell groovy = new GroovyShell ( conf ) ; setupContextClassLoader ( groovy ) ; Script s = groovy . parse ( getScriptSource ( isScriptFile , script ) ) ; if ( args . isEmpty ( ) ) { BufferedReader reader = new BufferedReader ( new InputStreamReader ( System . in ) ) ; PrintWriter writer = new PrintWriter ( System . out ) ; try { processReader ( s , reader , writer ) ; } finally { reader . close ( ) ; writer . close ( ) ; } } else { Iterator i = args . iterator ( ) ; while ( i . hasNext ( ) ) { String filename = ( String ) i . next ( ) ; File file = huntForTheScriptFile ( filename ) ; processFile ( s , file ) ; } } }
process the input files .
