NIHVIVO-3087 Improve handling of method invocation in argumentless method dump. Add unit test for this case.
This commit is contained in:
parent
4229e04a02
commit
092f6ed4d8
4 changed files with 59 additions and 47 deletions
21
webapp/src/freemarker/ext/beans/WrapperExtractor.java
Normal file
21
webapp/src/freemarker/ext/beans/WrapperExtractor.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package freemarker.ext.beans;
|
||||
|
||||
|
||||
/**
|
||||
* Class to expose template model wrapper. Used as workaround to gaps
|
||||
* in the 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();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue