Java Code Examples for groovy.lang.GroovySystem#getVersion()

The following examples show how to use groovy.lang.GroovySystem#getVersion() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GroovyScriptEngineFactory.java    From groovy with Apache License 2.0 6 votes vote down vote up
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 GroovySystem.getVersion();
        } else if ("THREADING".equals(key)) {
            return "MULTITHREADED";
        } else {
            throw new IllegalArgumentException("Invalid key");
        }

    }
 
Example 2
Source File: GroovyScriptEngineFactory.java    From hasor with Apache License 2.0 6 votes vote down vote up
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 GroovySystem.getVersion();
    } else if ("THREADING".equals(key)) {
        return "MULTITHREADED";
    } else {
        throw new IllegalArgumentException("Invalid key");
    }
}
 
Example 3
Source File: FileSystemCompiler.java    From groovy with Apache License 2.0 5 votes vote down vote up
@Override
public String[] getVersion() {
    return new String[]{
            "Groovy compiler version " + GroovySystem.getVersion(),
            "Copyright 2003-2020 The Apache Software Foundation. http://groovy-lang.org/",
            "",
    };
}
 
Example 4
Source File: GroovyMain.java    From groovy with Apache License 2.0 5 votes vote down vote up
@Override
public String[] getVersion() {
    return new String[] {
            "Groovy Version: " + GroovySystem.getVersion() + " JVM: " + System.getProperty("java.version") +
            " Vendor: " + System.getProperty("java.vm.vendor")  + " OS: " + System.getProperty("os.name")
    };
}
 
Example 5
Source File: GroovyScript.java    From MtgDesktopCompanion with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String getVersion() {
	return GroovySystem.getVersion();
}
 
Example 6
Source File: GroovyScriptEngineFactory.java    From groovy with Apache License 2.0 4 votes vote down vote up
public String getLanguageVersion() {
    return GroovySystem.getVersion();
}
 
Example 7
Source File: GroovyScriptEngineFactory.java    From hasor with Apache License 2.0 4 votes vote down vote up
public String getLanguageVersion() {
    return GroovySystem.getVersion();
}