Maven migration (first draft)
This commit is contained in:
parent
5e0329908c
commit
e1ff94ccaf
2866 changed files with 1112 additions and 616 deletions
22
api/src/main/java/freemarker/ext/beans/WrapperExtractor.java
Normal file
22
api/src/main/java/freemarker/ext/beans/WrapperExtractor.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package freemarker.ext.beans;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue