com.hubspot.jinjava.el.JinjavaELContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jinjava Show documentation
Show all versions of jinjava Show documentation
Jinja templating engine implemented in Java
package com.hubspot.jinjava.el;
import java.lang.reflect.Method;
import javax.el.ELResolver;
import de.odysseus.el.util.SimpleContext;
public class JinjavaELContext extends SimpleContext {
private MacroFunctionMapper functionMapper;
public JinjavaELContext() {
super();
}
public JinjavaELContext(ELResolver resolver) {
super(resolver);
}
@Override
public MacroFunctionMapper getFunctionMapper() {
if (functionMapper == null) {
functionMapper = new MacroFunctionMapper();
}
return functionMapper;
}
@Override
public void setFunction(String prefix, String localName, Method method) {
getFunctionMapper().setFunction(prefix, localName, method);
}
}