You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Dmitri Blinov (JIRA)" <ji...@apache.org> on 2015/08/15 07:51:45 UTC
[jira] [Created] (JEXL-173) Duck-typed java closures
Dmitri Blinov created JEXL-173:
----------------------------------
Summary: 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
Priority: Minor
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)