You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Osy (JIRA)" <ji...@apache.org> on 2019/08/11 18:42:00 UTC

[jira] [Created] (JEXL-310) Define Alias or synonyms for Methods with parameters and accesible through Jexl Context

Osy created JEXL-310:
------------------------

             Summary: Define Alias or synonyms for Methods with parameters and accesible through Jexl Context 
                 Key: JEXL-310
                 URL: https://issues.apache.org/jira/browse/JEXL-310
             Project: Commons JEXL
          Issue Type: Wish
    Affects Versions: 3.1
            Reporter: Osy


I have a static method:

*Util.round : public static Object round(Object number, Object places)*

I can access this Method within an expression adding the class to the context

*jexlContext.set("util", new Util());*

And using an expression as *:  util.round(34.678,2)***

However -within the jexl expression - I don't want to access the method round as :

*util.round(34.678,2),* instead I want to use the method with my own name:

+*$$ROUND**(34.678,2)*+**

It is possible?

 

 

 

 

 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)