May be kept as the value of a field and passed in a DataBoundConstructor parameter
I have no idea what you are attempting to do, but it will probably not work, or if it does, not be secure. I would advise not attempting to use in-process Groovy scripting if you can possibly avoid it.