It seems like the solution is to use groovy's type checking extensions. http://docs.groovy-lang.org/next/html/documentation/type-checking-extensions.html#_precompiled_type_checking_extensions
But how do I do this from inside Java? I want to load my script and for every property that the compiler does not resolve, I should be able to provide a resolution based on the runtime state the script was compiled in. Meaning compiling a script that came from team X should allow variables CAR, BIKE and SCOOTER. Team Y should not have these variables, instead it should allow variables POT, PAN and CUP. I will know what variables are valid through string lists in my java code. -- View this message in context: http://groovy.329449.n5.nabble.com/TypeChecked-and-with-custom-methods-parameters-using-ExpandoMetaClass-tp5733289p5733291.html Sent from the Groovy Users mailing list archive at Nabble.com.
