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

Improvements for invoking static methods

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • None
    • 3.1
    • None

    Description

      Two related suggestions:

      1. The documentation does not really describe how to call a static method from a JEXL script. I believe that it is done this way:

      class="".class;
      return class.forName("java.lang.System").getenv("test");
      

      2. Implementing a class() function that parallels the existing new() function would make calling static methods easier, helping to clean up scripts. The above example would become:

      return class("java.lang.System").getenv("test");
      

      Attachments

        Activity

          People

            henrib Henri Biestro
            george scott George Scott
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: