wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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 Versus Java for the authors of Groovy in Action
Groovy performance
Does groovy break Java (philosophically)?