[
https://issues.apache.org/jira/browse/JEXL-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henri Biestro resolved JEXL-173.
--------------------------------
Resolution: Fixed
Small change in Interpreter; objects exposing a 'call' can be used in function
calls.
Revision: 1698221
> Duck-typed java closures
> ------------------------
>
> Key: JEXL-173
> URL: https://issues.apache.org/jira/browse/JEXL-173
> Project: Commons JEXL
> Issue Type: New Feature
> Affects Versions: 3.0
> Reporter: Dmitri Blinov
> Assignee: Henri Biestro
> Priority: Minor
> Fix For: 3.0
>
>
> Suppose we have a plain java class which implements a "call" method
> {code}
> public class Foo {
> public Object call(Object bar) {
> return null;
> }
> }
> {code}
> In JEXL we could resolve a function() operator on this class directly, in
> other words use this class as a closure and invoke a "call" method.
> {code}
> x = new ("Foo"); return x(3);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)