Re: instanceOf and/or isAssignableFrom operator in freemarker
Attila Szegedi <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
On 2009.04.23., at 13:07, Daniel Dekany wrote: > Actually, Attila, can't BeansWrapper already do that? I don't know... When the objects are exposed through BeansWrapper, it is indeed possible to access the class of the object using either obj.class or obj.getClass(), so you can call instanceOf and isAssignableFrom on them. The thing that's not trivially possible is to obtain an arbitrary Class object given its name... Attila. > I guess it should be able to, given it *is* for exposing Java object > as-is (OK, with some security restrictions and like, but you get what > I mean), and the class is a quite important information for Java > classes, given that in the Java world duck-typing and like is at best > rare. > > -- > Best regards, > Daniel Dekany ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p