spullara/mustache.java — pull request #43 by mcheely (2012-08-01 21:28:07+00:00)
Title: Optionally support access to non get(key) methods on instances of Map

This allows for access to methods other than get(key) on classes that implement Map. The feature is off by default, but can by activated by setting an option on ObjectHandler.

The only thing that I don't like about this is that if you access an instance of Map and fall back to a method, but later use the same template with a different Map containing a matching key, the method call will be used first due to the wrapper caching (I think). However, it's a corner case, and I don't see a solution for it other than moving wrapper caching into the ObjectHandler or some similar refactoring.