NIHVIVO-1562 Sort properties and methods of template model objects in dump. This commit contains a regression: exposureLevel has been removed, so public methods that are hidden by the BeansWrapper are still included in the dump. Will be corrected in an upcoming commit.

This commit is contained in:
rjy7 2011-03-10 17:26:57 +00:00
parent daee356424
commit 36e5bc2574
5 changed files with 36 additions and 93 deletions

View file

@ -1,27 +0,0 @@
/* $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();
}
}