velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Polet <guillaume.po...@gmail.com>
Subject Handling of primitive type arrays
Date Wed, 18 Apr 2012 17:51:32 GMT
Hi list,

I was wondering how arrays of primitives are handled in Velocity. I feel 
that they are converted to List<> and then we cannot invoke methods with 
them as parameters.

Let's take an example:

#set($array = [$ref.getLong(), $ref.getLong(), $ref.getLong()] # where 
$ref.getLong() returns a long (primitive type)
#ref.invokeSomeMethod($array) # where the signature is actually public 
void invokeSomeMethod(long[] values)

How can I get this to work?

Cheers,
Guillaume

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


Mime
View raw message