當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。