Dmitri Blinov created JEXL-268:
----------------------------------
Summary: Jexl lambdas as parameters to new Java8 methods
Key: JEXL-268
URL: https://issues.apache.org/jira/browse/JEXL-268
Project: Commons JEXL
Issue Type: New Feature
Affects Versions: 3.1
Reporter: Dmitri Blinov
Java8 introduced functional interfaces, among them {{Function}} and
{{BiFunction}} interfaces which are used as parameters to method calls, for
example, {{Map.computeIfAbsent()}} or {{Map.computeIfPresent()}}. In Jexl we
have lambdas which in theory are good candidates to construct a {{Function}}
for lambda with one parameter, and a {{BiFunction}} for lambda with two
parameters.
The problem is Jexl can not currently support Java8 features and all instances
of lambda are of single {{internal.Closure}} class, which should not try to
implement both interfaces at once. One of the solutions, IMO, is to have a
feature to overload lamda creations to construct custom lambda classes without
shaking Jexl code tree.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)