File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Groovy and the fly likes Simple validator for groovy code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Simple validator for groovy code" Watch "Simple validator for groovy code" New topic

Simple validator for groovy code

Bojan Dolinar

Joined: Nov 15, 2011
Posts: 6
In our software, administrators can configure arbitrary operations on data. For example, administrator writes t1 + t2 and binds both variables. The expression is evaluated as a groovy script and it works just fine.
Now we want to supply a validation whether all the variables in expression are really bound. The simplest way would be to get a list of all dynamic variables from parser, but after a lot of searching I just didn't find a way to do it. I'm probably missing something really obvious, since that kind of information should be available. For example, when I edit groovy code in IDEA, all dynamic variables and methods are underlined.
Any pointers on this will be much appreciated. Thanks!
Bojan Dolinar

Joined: Nov 15, 2011
Posts: 6
Found it!
Consider Paul's rocket mass heater.
subject: Simple validator for groovy code
Similar Threads
Greasing the wheels of Java - What's up with all the hype on Ruby and Groovy?
Why will I use Groovy?
Groovy performance
Does groovy break Java (philosophically)?
Groovy Versus Java for the authors of Groovy in Action