Iosif Zeldin created GROOVY-11797:
-------------------------------------

             Summary: GroovyScriptEngineImpl: expose compile method with 
ability to specify the class name
                 Key: GROOVY-11797
                 URL: https://issues.apache.org/jira/browse/GROOVY-11797
             Project: Groovy
          Issue Type: New Feature
          Components: groovy-jsr223
            Reporter: Iosif Zeldin


I have a huge number of groovy scripts in my project, which are lazily compiled 
and evaluated. 
For debugging and profiling purposes it would be very useful to name groovy 
classes created from these scripts. 
{{getScriptClass}} method allows to read the class name from engine context, 
but in my application this context is shared between indefinite number of 
scripts. 
So, I got to synchronize calling of {{compile}} method, which is not really 
convenient. 

It would be great to expose either {{compile}} with additional {{className}} 
parameter or {{context}} parameter.

I fully understand that current {{compile}} methods are taken from 
{{{}javax.script.Compilable{}}}, but as long as I use implementation directly 
it does not really matter.   
  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to