All Downloads are FREE. Search and download functionalities are using the official Maven repository.

freemarker.ext.beans.WrapperExtractor Maven / Gradle / Ivy

The newest version!
/* $This file is distributed under the terms of the license in LICENSE$ */

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();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy