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

Method getText

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

Get the text of the Groovy script at the given location. If the location is a file path and it does not exist as given, then GroovyMain#huntForTheScriptFile(String) is called to try with some Groovy extensions appended. This method is not used to process scripts and is retained for backward

(String uriOrFilename)

Source from the content-addressed store, hash-verified

477 * @deprecated
478 */
479 @Deprecated
480 public String getText(String uriOrFilename) throws IOException {
481 if (URI_PATTERN.matcher(uriOrFilename).matches()) {
482 try {
483 return ResourceGroovyMethods.getText(new URL(uriOrFilename));
484 } catch (Exception e) {
485 throw new GroovyRuntimeException("Unable to get script from URL: ", e);
486 }
487 }
488 return ResourceGroovyMethods.getText(huntForTheScriptFile(uriOrFilename));
489 }
490
491 /**
492 * Get a new GroovyCodeSource for a script which may be given as a location

Callers

nothing calls this directly

Calls 3

getTextMethod · 0.95
huntForTheScriptFileMethod · 0.95
matchesMethod · 0.65

Tested by

no test coverage detected