groovy

Patch to provide acess to Script Object in GroovyScriptEngine

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0-JSR-6
  • Fix Version/s: 1.5.5, 1.6-beta-1
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

Patch to provide acess to Script Object in GroovyScriptEngine. This is to allow dependency injection (and multiple return values) from scripts, through acess to setProperty, getProperty.

Activity

Hide
Paul King added a comment -

Added. Thanks for the patch.

Show
Paul King added a comment - Added. Thanks for the patch.
Hide
Colin Taylor added a comment -

Lost track of this a bit, but as 1.5.4 there still is no useable way of getting script objects.

public Script createScript(Binding binding, ScriptCacheEntry entry) {

relies on a private class ScriptCacheEntry which can only be obtained via the private method :

private ScriptCacheEntry updateCacheEntry(String scriptName)

Show
Colin Taylor added a comment - Lost track of this a bit, but as 1.5.4 there still is no useable way of getting script objects. public Script createScript(Binding binding, ScriptCacheEntry entry) { relies on a private class ScriptCacheEntry which can only be obtained via the private method : private ScriptCacheEntry updateCacheEntry(String scriptName)
Hide
Paul King added a comment -

Apologies, I refactored your patch one step too far. Should be fixed now.

Show
Paul King added a comment - Apologies, I refactored your patch one step too far. Should be fixed now.
Hide
Paul King added a comment -

close off release 1.5.4

Show
Paul King added a comment - close off release 1.5.4

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: