new"
From Documentation
(Created page with '{{ZUMLReferencePageHeader}} <source lang="java"> Object new(Object cls); </source> :i.e., <javadoc method="new_(java.lang.Object)">org.zkoss.xel.fn.CommonFns</javadoc> Instant…') |
|||
(One intermediate revision by one other user not shown) | |||
Line 13: | Line 13: | ||
=Version History= | =Version History= | ||
− | + | {{LastUpdated}} | |
{| border='1px' | width="100%" | {| border='1px' | width="100%" | ||
! Version !! Date !! Content | ! Version !! Date !! Content | ||
|- | |- | ||
− | | | + | | 5.0.6 |
− | | | + | | December 2010 |
− | | | + | | Automatically converted a number to the correct type (aka., class). |
+ | Notice that a number specified in EL is interpreted as long, by default. For example, in <tt>${c:new('foo.Mine', 10)}</tt>, 10 is interpreted as long. If you're using 5.0.5 and prior, you have to convert it to integer manually : <tt>${c:new('foo.Mine', c:int(10))}</tt>. | ||
|} | |} | ||
{{ZUMLReferencePageFooter}} | {{ZUMLReferencePageFooter}} |
Revision as of 03:58, 10 January 2011
Object new(Object cls);
- i.e., CommonFns.new_(Object)
Instantiates the given class. It assumes the given class has a default constructor.
Paramters
- cls - the class. It could be an instance of either String or Class.
Version History
Version | Date | Content |
---|---|---|
5.0.6 | December 2010 | Automatically converted a number to the correct type (aka., class).
Notice that a number specified in EL is interpreted as long, by default. For example, in ${c:new('foo.Mine', 10)}, 10 is interpreted as long. If you're using 5.0.5 and prior, you have to convert it to integer manually : ${c:new('foo.Mine', c:int(10))}. |