groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Amerige <>
Subject Groovy has: Add Imports Transparently to Scripts with ImportCustomizer; Is there a Java equivalent?
Date Mon, 20 Jul 2015 11:54:23 GMT
I received the question:

> *org.codehaus.groovy *implementation of Groovy (groovy-all) provides a 
> mechanism to set imports when evaluating Groovy code via 
> *CompilerConfiguration *and *ImportCustomizer*. I don't see the 
> equivalent in *javax.script *in *ScriptEngine*/*ScriptContext*. Is 
> there a way I can add (implicit) imports in *javax.script*, perhaps by 
> setting a *ScriptContext *attribute? 

Can anyone throw any light on this?  MrHaki has a nice article 

on the Groovy side.

Steve Amerige
Principal Software Developer, Fraud and Compliance Solutions Development
SAS Institute, 100 SAS Campus Dr, Room U3050, Cary, NC 27513-8617

View raw message