[ 
https://issues.apache.org/jira/browse/JEXL-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Henri Biestro resolved JEXL-232.
--------------------------------
       Resolution: Won't Do
         Assignee: Henri Biestro
    Fix Version/s: 3.2

There is an existing syntax to instantiate new objects (i.e. new(....)) from an 
arbitrary class/class-name and calling the appropriate constructor.
There is already (more than one) customization point that would allow 
instantiating objects as result of a function call (namely, null namespace 
resolution). 
Arrays, lists, sets and map literals can be created and their creation methods 
customized as well.
There also seems to be some overlap with JEXL-224.



> Use Class types as functors to create object instances
> ------------------------------------------------------
>
>                 Key: JEXL-232
>                 URL: https://issues.apache.org/jira/browse/JEXL-232
>             Project: Commons JEXL
>          Issue Type: Wish
>    Affects Versions: 3.1
>            Reporter: Dmitri Blinov
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.2
>
>
> It would allow to write more compact and java-like scripts if it would be 
> possible to use the Class types as functors to call appropriate constructor 
> to create object instances, e.g.
> {code}
> x = HashMap(10, 0.75);
> {code}
> where {{HashMap}} is the variable of the {{java.lang.Class}} type.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to