groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JamieEchlin <jamie.ech...@gmail.com>
Subject getting method from properties in AST
Date Mon, 24 Aug 2015 16:06:59 GMT
Hi...

Relating to my question:
http://groovy.329449.n5.nabble.com/how-to-get-compiler-warnings-tt5727239.html

I have a type checking AST more or less following the model Cedric proposed
at http://melix.github.io/blog/2015/03/sandboxing.html.

But I have a problem. Given a java class:

class Foo {
   def getText() {}
}

If the user-supplied code is: 

foo.text

I need to know that this is really "foo.getText()". 

Presumably I could duplicate the rules that groovy uses, eg look at
getText(), then isText(), but I would have thought there would be a better
way. Perhaps run the AST later in the process? But then I don't think I can.



--
View this message in context: http://groovy.329449.n5.nabble.com/getting-method-from-properties-in-AST-tp5727244.html
Sent from the Groovy Users mailing list archive at Nabble.com.

Mime
View raw message