commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitri Blinov (JIRA)" <>
Subject [jira] [Created] (JEXL-268) Jexl lambdas as parameters to new Java8 methods
Date Tue, 21 Aug 2018 09:37:00 GMT
Dmitri Blinov created JEXL-268:

             Summary: Jexl lambdas as parameters to new Java8 methods
                 Key: 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

View raw message