当前位置: 首页>>代码示例>>Java>>正文


Java FunctionMapper类代码示例

本文整理汇总了Java中javax.el.FunctionMapper的典型用法代码示例。如果您正苦于以下问题:Java FunctionMapper类的具体用法?Java FunctionMapper怎么用?Java FunctionMapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FunctionMapper类属于javax.el包,在下文中一共展示了FunctionMapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildEvaluationContext

import javax.el.FunctionMapper; //导入依赖的package包/类
public static EvaluationContext buildEvaluationContext(
        Map<String, Method> functionMethodMap,
        Map<String, Object> attributeMap) {

    VariableMapper vMapper = buildVariableMapper(attributeMap);
    FunctionMapper fMapper = buildFunctionMapper(functionMethodMap);

    EsfingeELContext context = new EsfingeELContext(fMapper, vMapper,
    		new ArrayELResolver(), new ListELResolver(), new MapELResolver(), new BeanELResolver());

    return new EvaluationContext(context, fMapper, vMapper);
}
 
开发者ID:EsfingeFramework,项目名称:querybuilder,代码行数:13,代码来源:ELUtils.java

示例2: createELContext

import javax.el.FunctionMapper; //导入依赖的package包/类
private ELContext createELContext(final ELResolver resolver, final FunctionMapper functionMapper, final VariableMapper variableMapper) {

        return new ELContext() {
            @Override
            public ELResolver getELResolver() {
                return resolver;
            }

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

            @Override
            public VariableMapper getVariableMapper() {
                return variableMapper;
            }
        };
    }
 
开发者ID:astefanutti,项目名称:metrics-cdi,代码行数:20,代码来源:ElMetricName.java

示例3: getType

import javax.el.FunctionMapper; //导入依赖的package包/类
@Override
public Class<?> getType(EvaluationContext ctx)
        throws ELException {
    
    FunctionMapper fnMapper = ctx.getFunctionMapper();
    
    // quickly validate again for this request
    if (fnMapper == null) {
        throw new ELException(MessageFactory.get("error.fnMapper.null"));
    }
    Method m = fnMapper.resolveFunction(this.prefix, this.localName);
    if (m == null) {
        throw new ELException(MessageFactory.get("error.fnMapper.method",
                this.getOutputName()));
    }
    return m.getReturnType();
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:18,代码来源:AstFunction.java

示例4: getType

import javax.el.FunctionMapper; //导入依赖的package包/类
public Class getType(EvaluationContext ctx)
        throws ELException {
    
    FunctionMapper fnMapper = ctx.getFunctionMapper();
    
    // quickly validate again for this request
    if (fnMapper == null) {
        throw new ELException(MessageFactory.get("error.fnMapper.null"));
    }
    Method m = fnMapper.resolveFunction(this.prefix, this.localName);
    if (m == null) {
        throw new ELException(MessageFactory.get("error.fnMapper.method",
                this.getOutputName()));
    }
    return m.getReturnType();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:17,代码来源:AstFunction.java

示例5: ValueExpressionImpl

import javax.el.FunctionMapper; //导入依赖的package包/类
/**
 * 
 */
public ValueExpressionImpl(String expr, Node node, FunctionMapper fnMapper,
        VariableMapper varMapper, Class expectedType) {
    this.expr = expr;
    this.node = node;
    this.fnMapper = fnMapper;
    this.varMapper = varMapper;
    this.expectedType = expectedType;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:ValueExpressionImpl.java

示例6: validateExpressions

import javax.el.FunctionMapper; //导入依赖的package包/类
/**
     * Validates the syntax of all ${} expressions within the given string.
     * @param where the approximate location of the expressions in the JSP page
     * @param expressions a string containing zero or more "${}" expressions
     * @param err an error dispatcher to use
     * @deprecated now delegated to the org.apache.el Package
     */
    public static void validateExpressions(Mark where,
                                           String expressions,
                                           Class expectedType,
                                           FunctionMapper functionMapper,
                                           ErrorDispatcher err)
            throws JasperException {

//        try {
//            
//            JspUtil.expressionEvaluator.parseExpression( expressions, 
//                expectedType, functionMapper );
//        }
//        catch( ELParseException e ) {
//            err.jspError(where, "jsp.error.invalid.expression", expressions,
//                e.toString() );
//        }
//        catch( ELException e ) {
//            err.jspError(where, "jsp.error.invalid.expression", expressions,
//                e.toString() );
//        }
    }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:29,代码来源:JspUtil.java

示例7: ExpressionBuilder

import javax.el.FunctionMapper; //导入依赖的package包/类
/**
 *
 */
public ExpressionBuilder(String expression, ELContext ctx)
        throws ELException {
    this.expression = expression;

    FunctionMapper ctxFn = ctx.getFunctionMapper();
    VariableMapper ctxVar = ctx.getVariableMapper();

    if (ctxFn != null) {
        this.fnMapper = new FunctionMapperFactory(ctxFn);
    }
    if (ctxVar != null) {
        this.varMapper = new VariableMapperFactory(ctxVar);
    }
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:18,代码来源:ExpressionBuilder.java

示例8: CdiResolver

import javax.el.FunctionMapper; //导入依赖的package包/类
public CdiResolver() {
    context = new javax.el.ELContext() {

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

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

        @Override
        public javax.el.ELResolver getELResolver() {
            return getWrappedResolver();
        }
    };
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:20,代码来源:CdiResolver.java

示例9: getMethodExpression

import javax.el.FunctionMapper; //导入依赖的package包/类
public static MethodExpression getMethodExpression(
                                           String expression,
                                           PageContext pageContext,
                                           FunctionMapper functionMap,
                                           Class expectedType,
                                           Class[] paramTypes) {
                                                                            
    ELContextImpl elctxt = (ELContextImpl)pageContext.getELContext();
    elctxt.setFunctionMapper(functionMap);
    ExpressionFactory expFactory = getExpressionFactory(pageContext);
    return expFactory.createMethodExpression(
                                elctxt,
                                expression,
                                expectedType,
                                paramTypes);
}
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:17,代码来源:PageContextImpl.java

示例10: validateExpressions

import javax.el.FunctionMapper; //导入依赖的package包/类
/**
 * Validates the syntax of all EL expressions within the given string.
 * @param where the approximate location of the expressions in the JSP page
 * @param expressions a string containing an EL expressions
 * @param err an error dispatcher to use
 */
public static void validateExpressions(Mark where,
                                       String expressions,
                                       FunctionMapper functionMapper,
                                       ErrorDispatcher err)
        throws JasperException {

    try {
        ELContextImpl elContext = new ELContextImpl(null);
        elContext.setFunctionMapper(functionMapper);
        getExpressionFactory().createValueExpression(
            elContext, 
            expressions, Object.class);
    }
    catch( ELException e ) {
        err.jspError(where, "jsp.error.invalid.expression", expressions,
            e.toString() );
    }
}
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:25,代码来源:JspUtil.java

示例11: CdiResolver

import javax.el.FunctionMapper; //导入依赖的package包/类
public CdiResolver() {
  context = new javax.el.ELContext() {

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

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

    @Override
    public javax.el.ELResolver getELResolver() {
      return getWrappedResolver();
    }
  };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:20,代码来源:CdiResolver.java

示例12: ValueExpressionImpl

import javax.el.FunctionMapper; //导入依赖的package包/类
/**
 * 
 */
public ValueExpressionImpl(String expr, Node node, FunctionMapper fnMapper,
        VariableMapper varMapper, Class<?> expectedType) {
    this.expr = expr;
    this.node = node;
    this.fnMapper = fnMapper;
    this.varMapper = varMapper;
    this.expectedType = expectedType;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:12,代码来源:ValueExpressionImpl.java

示例13: createELContext

import javax.el.FunctionMapper; //导入依赖的package包/类
private ExtendedELContext createELContext(final ELResolver resolver, final FunctionMapper functionMapper,
		final VariableMapper variableMapper, final ConstantResolver constantResolver) {
	return new ExtendedELContext() {
		@Override
		public ELResolver getELResolver() {
			return resolver;
		}

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

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

		@Override
		public ConstantResolver getConstantResolver() {
			return constantResolver;
		}
	};
}
 
开发者ID:GluuFederation,项目名称:oxCore,代码行数:25,代码来源:ContextProducer.java

示例14: getType

import javax.el.FunctionMapper; //导入依赖的package包/类
public Class getType(EvaluationContext ctx)
throws ELException {
    
    FunctionMapper fnMapper = ctx.getFunctionMapper();
    
    // quickly validate again for this request
    if (fnMapper == null) {
        throw new ELException(MessageFactory.get("error.fnMapper.null"));
    }
    Method m = fnMapper.resolveFunction(this.prefix, this.localName);
    if (m == null) {
        throw new ELException(MessageFactory.get("error.fnMapper.method",
                this.getOutputName()));
    }
    return m.getReturnType();
}
 
开发者ID:seam2,项目名称:jboss-el,代码行数:17,代码来源:AstFunction.java

示例15: getValue

import javax.el.FunctionMapper; //导入依赖的package包/类
public Object getValue(EvaluationContext ctx)
throws ELException {
    
    FunctionMapper fnMapper = ctx.getFunctionMapper();
    
    // quickly validate again for this request
    if (fnMapper == null) {
        throw new ELException(MessageFactory.get("error.fnMapper.null"));
    }
    Method m = fnMapper.resolveFunction(this.prefix, this.localName);
    if (m == null) {
        throw new ELException(MessageFactory.get("error.fnMapper.method",
                this.getOutputName()));
    }
    
    // If no params, there are no children, jjtGetNumChildren returns 0 if no children, not NPE
    Object[] params = new Object[this.jjtGetNumChildren()];
    for (int i = 0; i < this.jjtGetNumChildren(); i++) {
        params[i] = this.children[i].getValue(ctx);
    }
    
    return ReflectionUtil.invokeMethod(null, m, params);
}
 
开发者ID:seam2,项目名称:jboss-el,代码行数:24,代码来源:AstFunction.java


注:本文中的javax.el.FunctionMapper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。