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

Duck-typed java closures

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0
    • 3.0
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: