Why engine instanceof GroovyScriptEngineImpl ?
-
20-02-2021 - |
Question
in groovy while getting the ScriptEngine using java6 feature, for groovy it gives me instance "GroovyScriptEngineImpl" which a type of class not an interface, is there any other way to get the interface ?
ScriptEngineManager factory = new ScriptEngineManager();
ScriptEngine engine = factory.getEngineByName("groovy");
assert engine instanceof GroovyScriptEngineImpl
is there any interface available instaed of using "GroovyScriptEngineImpl"
La solution
GroovyScriptEngineImpl implements the Compilable, Invocable, and ScriptEngine interfaces.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow