How to know variable/reference type in freemarker?

1.3k Views Asked by At

How can i find type of any variable or reference used in ftl template in freemarker.
eg. if there is this code <#assign skuSize = productDetailResponse.simpleSkus/>
How can I know what is type of productDetailResponse and productDetailResponse.simpleSkus?

1

There are 1 best solutions below

0
On

You mean the Java type of it. It's unusual in templates. On most configurations, and assuming those objects aren't Java types treated specially by FreeMarker (String, Number, Boolean, Date, List, Map and the like), productDetailResponse.class will call getClass() and so it works.