NIHVIVO-3087 Improve handling of method invocation in argumentless method dump. Add unit test for this case.

This commit is contained in:
ryounes 2011-08-05 17:11:45 +00:00
parent 5fd6020035
commit 43614290c4
4 changed files with 60 additions and 48 deletions

View file

@ -0,0 +1,19 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package freemarker.ext.beans;
/**
* Class to extract wrapper used to wrap an object into a template model object.
* Used as workaround to gap in Freemarker template model API (can't get wrapper
* for an arbitrary template model object).
*/
public class WrapperExtractor {
public static BeansWrapper getWrapper(BeanModel model) {
return model.wrapper;
}
public static int getWrapperExposureLevel(BeanModel model) {
return model.wrapper.getExposureLevel();
}
}