I've got data objects, which you could think of as a "simplified map". There are methods get(String)
, and put(String,Object)
, but that's basically it.
Now, I'd like to use JEXL to evaluate complex expressions on my data objects. I can do so by creating a custom JexlContext, and that works for expressions like "foo", or foo != null
. However, as soon as I attempt to use an expression like "foo.bar", Jexl fails with an error message "unsolvable property".
Obviously, Jexl uses my custom JexlContext to evaluate "foo", but can't evaluate "bar" on the foo object.
My impression is, that I've got to use a custom PropertyResolver. I can implement that, but I can't figure out. how to bring that into the game, as the JexlUberspect doesn't contain a method like setResolvers
, or addResolver
.