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

com.hubspot.jinjava.el.JinjavaELContext Maven / Gradle / Ivy

There is a newer version: 2.7.3
Show newest version
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);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy