Javaでは変数のクラスを
Object obj = new Integer(0);
if(obj instanceof Integer){/*処理*/}とinstanceofを用いて確認できます。
Velocityではinstanceof が使えないのでgetClassメソッドで比較するとよいかと思います。
#set($intClass = 0) #set($IntegerClass = $intClass.getClass()) #if($obj.getClass()==$IntegerClass)
Velocityの整数はintではなくIntegerなので$IntegerClassはIntegerクラスとなります。


