@Override public String name() { return "Groovy v" + InvokerHelper.getVersion(); } }
public String name() { return "Groovy v" + InvokerHelper.getVersion(); } }
public String name() { return "Groovy v" + InvokerHelper.getVersion(); } }
public String name() { return "Groovy v" + InvokerHelper.getVersion(); } }
public String getLanguageVersion() { return InvokerHelper.getVersion(); }
public static void displayVersion() { String version = InvokerHelper.getVersion(); System.err.println("Groovy compiler version " + version); System.err.println("Copyright 2003-2008 The Codehaus. http://groovy.codehaus.org/"); System.err.println(""); }
public static void displayVersion() { String version = InvokerHelper.getVersion(); System.err.println("Groovy compiler version " + version); System.err.println("Copyright 2003-2008 The Codehaus. http://groovy.codehaus.org/"); System.err.println(""); }
public Object getParameter(String key) { if (ScriptEngine.NAME.equals(key)) { return SHORT_NAME; } else if (ScriptEngine.ENGINE.equals(key)) { return getEngineName(); } else if (ScriptEngine.ENGINE_VERSION.equals(key)) { return VERSION; } else if (ScriptEngine.LANGUAGE.equals(key)) { return LANGUAGE_NAME; } else if (ScriptEngine.LANGUAGE_VERSION.equals(key)) { return InvokerHelper.getVersion(); } else if ("THREADING".equals(key)) { return "MULTITHREADED"; } else { throw new IllegalArgumentException("Invalid key"); } }
static void processArgs(String[] args, final PrintStream out) { Options options = buildOptions(); try { CommandLine cmd = parseCommandLine(options, args); if (cmd.hasOption('h')) { printHelp(out, options); } else if (cmd.hasOption('v')) { String version = InvokerHelper.getVersion(); out.println("Groovy Version: " + version + " JVM: " + System.getProperty("java.version")); } else { // If we fail, then exit with an error so scripting frameworks can catch it // TODO: pass printstream(s) down through process if (!process(cmd)) { System.exit(1); } } } catch (ParseException pe) { out.println("error: " + pe.getMessage()); printHelp(out, options); } }
static void processArgs(String[] args, final PrintStream out) { Options options = buildOptions(); try { CommandLine cmd = parseCommandLine(options, args); if (cmd.hasOption('h')) { printHelp(out, options); } else if (cmd.hasOption('v')) { String version = InvokerHelper.getVersion(); out.println("Groovy Version: " + version + " JVM: " + System.getProperty("java.version")); } else { // If we fail, then exit with an error so scripting frameworks can catch it // TODO: pass printstream(s) down through process if (!process(cmd)) { System.exit(1); } } } catch (ParseException pe) { out.println("error: " + pe.getMessage()); printHelp(out, options); } }
writer.println(MESSAGES.format("cli.info.version", new Object[] { InvokerHelper.getVersion() })); writer.flush(); System.exit(0);
writer.println(MESSAGES.format("cli.info.version", new Object[] { InvokerHelper.getVersion() })); writer.flush(); System.exit(0);
out.println(MESSAGES.format("startup_banner.0", new Object[] { InvokerHelper.getVersion(), System.getProperty("java.version") })); out.println(MESSAGES.getMessage("startup_banner.1"));
out.println(MESSAGES.format("startup_banner.0", new Object[] { InvokerHelper.getVersion(), System.getProperty("java.version") })); out.println(MESSAGES.getMessage("startup_banner.1"));