MCPcopy Index your code
hub / github.com/apache/groovy / processFiles

Method processFiles

src/main/java/groovy/ui/GroovyMain.java:598–618  ·  view source on GitHub ↗

Process the input files.

()

Source from the content-addressed store, hash-verified

596 * Process the input files.
597 */
598 private void processFiles() throws CompilationFailedException, IOException, URISyntaxException {
599 GroovyShell groovy = new GroovyShell(Thread.currentThread().getContextClassLoader(), conf);
600 setupContextClassLoader(groovy);
601
602 Script s = groovy.parse(getScriptSource(isScriptFile, script));
603
604 if (args.isEmpty()) {
605 try(BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) {
606 PrintWriter writer = new PrintWriter(System.out);
607 processReader(s, reader, writer);
608 writer.flush();
609 }
610 } else {
611 for (String filename : args) {
612 //TODO: These are the arguments for -p and -i. Why are we searching using Groovy script extensions?
613 // Where is this documented?
614 File file = huntForTheScriptFile(filename);
615 processFile(s, file);
616 }
617 }
618 }
619
620 /**
621 * Process a single input file.

Callers 1

runMethod · 0.95

Calls 8

parseMethod · 0.95
getScriptSourceMethod · 0.95
processReaderMethod · 0.95
huntForTheScriptFileMethod · 0.95
processFileMethod · 0.95
isEmptyMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected