1 Feb
2010
1 Feb
'10
9:11 a.m.
Hi all, I use method parseGroovyFromPage() to instantiate an object from a Groovy class stored in a page. It works well, but now I would like to forbid multiple executions of this class. To do so, I changed it to be a singleton, setting the constructor as private. Of course, now, parseGroovyFromPage() returns that the object can't be instantiated ... As the call to the constructor is inside this method, I can't change it to just call getInstance(). Are there any workarounds, or other ways to achieve this ? Thanks, Jeremie