velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <shinobu.ka...@gmail.com>
Subject Array #length and #clone() support.
Date Sat, 06 Nov 2004 13:04:09 GMT
Hi all,

I added array #length and #clone() support to the PublicFieldUberspect.
cf. http://localhost/java/langspec-2.0/arrays.doc.html#64347

This seems a good place for the #length support, but I'm not sure if
the #clone() support belongs to this class.  (But I put it here
anyways.  :))

If you set
   runtime.introspector.uberspect =
org.apache.velocity.tools.generic.introspection.PublicFieldUberspect
in your velocity.properties, you can do the following:

$array                        -> int[] {1, 2, 3}
$array.length                 -> 3
#set($clone = $array.clone())
$clone                        -> int[] {1, 2, 3}, != $array

Any comments welcome.

Best regards,
-- Shinobu Kawai

-- 
Shinobu Kawai <shinobu.kawai@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message