[groovy-user] Secure AST customiser and script binding
2015-03-26 21:36:58 GMT
Evening… I’m having some problems with extending SecureASTCustomizer. I am setting the receiversClassesWhiteList.
The problem is, in visitPropertyExpression and visitMethodCallExpression, the receiver.getType() is java.lang.Object. I suspect this is because I am running a script like this:
where foo is passed in in the script binding. So at compilation stage, it can’t be known that foo is actually a Foo, and not just an Object.
Is it possible to somehow hook up the types in the script binding with the secure AST customiser?