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

org.jtwig.functions.ExpressionResolver Maven / Gradle / Ivy

package org.jtwig.functions;

import com.google.common.base.Function;
import org.jtwig.model.expression.Expression;
import org.jtwig.render.RenderRequest;

public class ExpressionResolver implements Function {
    private final RenderRequest renderRequest;

    public ExpressionResolver(RenderRequest renderRequest) {
        this.renderRequest = renderRequest;
    }

    @Override
    public Object apply(Expression input) {
        return renderRequest.getEnvironment().getRenderEnvironment().getCalculateExpressionService().calculate(renderRequest, input);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy