Reverted use of exposureLevel in dump methods, removed in r7599.
This commit is contained in:
parent
b0c68e5176
commit
28b6c4b867
3 changed files with 115 additions and 54 deletions
27
webapp/src/freemarker/ext/beans/WrapperExtractor.java
Normal file
27
webapp/src/freemarker/ext/beans/WrapperExtractor.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package freemarker.ext.beans;
|
||||
|
||||
/**
|
||||
* Class to extract information about the wrapper used to wrap an object in
|
||||
* the template model. This is something of a hack: the class belongs to
|
||||
* package freemarker.ext.beans so we can get at protected members of
|
||||
* BeanModel and BeansWrapper. The Freemarker API unfortunately provides
|
||||
* no way to get the wrapper that is used to wrap an object in the
|
||||
* template data model.
|
||||
*/
|
||||
public class WrapperExtractor {
|
||||
|
||||
public static BeansWrapper getWrapper(BeanModel model) {
|
||||
return model.wrapper;
|
||||
}
|
||||
|
||||
public static int getWrapperExposureLevel(BeanModel model) {
|
||||
return model.wrapper.getExposureLevel();
|
||||
}
|
||||
|
||||
public static int getWrapperExposureLevel(BeansWrapper wrapper) {
|
||||
return wrapper.getExposureLevel();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue