Example usage for javax.el ArrayELResolver ArrayELResolver

List of usage examples for javax.el ArrayELResolver ArrayELResolver

Introduction

In this page you can find the example usage for javax.el ArrayELResolver ArrayELResolver.

Prototype

public ArrayELResolver() 

Source Link

Usage

From source file:com.github.htfv.maven.plugins.buildconfigurator.core.el.BuildConfiguratorELResolver.java

/**
 * Creates a new instance of EL resolver which may be used for expression
 * evaluation. Returned resolver includes not only
 * {@code BuildConfiguratorELResolver}, but also all standard resolvers.
 *
 * @param mavenProject/*from   w  ww  . java  2  s  . co m*/
 *            reference to the configured Maven project. Used to resolve
 *            properties referenced in EL expressions.
 * @param configuration
 *            loaded property files.
 *
 * @return new instance of EL resolver.
 */
public static ELResolver newInstance(final MavenProject mavenProject, final Configuration configuration) {
    final CompositeELResolver elResolver = new CompositeELResolver();

    elResolver.add(new BuildConfiguratorELResolver(mavenProject, configuration));
    elResolver.add(new ArrayELResolver());
    elResolver.add(new ListELResolver());
    elResolver.add(new MapELResolver());
    elResolver.add(new ResourceBundleELResolver());

    //
    // BeanELResolver should be the last one.
    //

    elResolver.add(new BeanELResolver());

    return elResolver;
}

From source file:biz.netcentric.cq.tools.actool.configreader.YamlMacroElEvaluator.java

public YamlMacroElEvaluator() {

    try {/*  www.j a  v a 2  s. c o m*/
        Class<?> expressionFactoryClass = getClass().getClassLoader()
                .loadClass("org.apache.el.ExpressionFactoryImpl");
        expressionFactory = (ExpressionFactory) expressionFactoryClass.newInstance();
    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
        throw new IllegalStateException("Could not init EL: " + e);
    }

    final VariableMapper variableMapper = new ElVariableMapper();
    final ElFunctionMapper functionMapper = new ElFunctionMapper();
    final CompositeELResolver compositeELResolver = new CompositeELResolver();

    compositeELResolver.add(new BaseELResolver());
    compositeELResolver.add(new ArrayELResolver());
    compositeELResolver.add(new ListELResolver());
    compositeELResolver.add(new BeanELResolver());
    compositeELResolver.add(new MapELResolver());
    context = new ELContext() {
        @Override
        public ELResolver getELResolver() {
            return compositeELResolver;
        }

        @Override
        public FunctionMapper getFunctionMapper() {
            return functionMapper;
        }

        @Override
        public VariableMapper getVariableMapper() {
            return variableMapper;
        }
    };

}

From source file:org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspApplicationContext.java

public GroovyPagesJspApplicationContext() {
    elResolver.add(new ImplicitObjectELResolver());
    elResolver.add(additionalResolvers);
    elResolver.add(new MapELResolver());
    elResolver.add(new ResourceBundleELResolver());
    elResolver.add(new ListELResolver());
    elResolver.add(new ArrayELResolver());
    elResolver.add(new BeanELResolver());
    elResolver.add(new ScopedAttributeELResolver());
}

From source file:org.tinygroup.jspengine.runtime.PageContextImpl.java

private ELResolver getELResolver() {

    if (elResolver == null) {
        // Create a CompositeELResolver
        CompositeELResolver celResolver = new CompositeELResolver();

        celResolver.add(new ImplicitObjectELResolver());
        // Add ELResolvers registered in JspApplicationContext
        JspApplicationContextImpl jaContext = getJspApplicationContext();
        Iterator<ELResolver> it = jaContext.getELResolvers();
        while (it.hasNext()) {
            celResolver.add(it.next());/*from   w w  w . j  a v a 2 s.c o m*/
        }
        celResolver.add(new MapELResolver());
        celResolver.add(new ResourceBundleELResolver());
        celResolver.add(new ListELResolver());
        celResolver.add(new ArrayELResolver());
        celResolver.add(new BeanELResolver());
        celResolver.add(new ScopedAttributeELResolver());
        elResolver = celResolver;
    }
    return elResolver;
}