Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-173

Duck-typed java closures

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0
    • Labels:
      None

      Description

      Suppose we have a plain java class which implements a "call" method

      public class Foo {
         public Object call(Object bar) {
             return null;
         }
      }
      

      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.

      x = new ("Foo"); return x(3);
      

        Attachments

          Activity

            People

            • Assignee:
              henrib Henri Biestro
              Reporter:
              dmitri_blinov Dmitri Blinov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: