[ 
https://issues.apache.org/jira/browse/APEXMALHAR-2485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15982108#comment-15982108
 ] 

Vlad Rozov commented on APEXMALHAR-2485:
----------------------------------------

Time to call Constructor.newInstance() 5280 ms, new Pojo() directly 802 ms, 
using PojoConstructor.newInstance() 880 ms.

> PojoUtils should support empty constructors for Pojos
> -----------------------------------------------------
>
>                 Key: APEXMALHAR-2485
>                 URL: https://issues.apache.org/jira/browse/APEXMALHAR-2485
>             Project: Apache Apex Malhar
>          Issue Type: Improvement
>            Reporter: Vlad Rozov
>
> Currently, PojoUtils only supports getters and setters. It should be possible 
> to extend PojoUtils to support constructors as well.
> {code}
>   public interface PojoConstructor {
>     Object newInstance();
>   }
>   PojoConstructor pojoConstructor = 
> (PojoConstructor)evaluator.createFastEvaluator("return new Pojo();", 
> PojoConstructor.class, null);
>   pojoConstructor.newInstance();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to