📄 expressionfactory.java
字号:
/* ExpressionFactory.java{{IS_NOTE Purpose: Description: History: Thu Aug 30 10:29:09 2007, Created by tomyeh}}IS_NOTECopyright (C) 2007 Potix Corporation. All Rights Reserved.{{IS_RIGHT This program is distributed under GPL Version 2.0 in the hope that it will be useful, but WITHOUT ANY WARRANTY.}}IS_RIGHT*/package org.zkoss.xel;/** * Used to prepare expressions ({@link Expression}). * * @author tomyeh * @since 3.0.0 */public interface ExpressionFactory { /** Used with {@link #isSupported} to know whether the factory * supports {@link FunctionMapper#resolveFunction} */ public static final int FEATURE_FUNCTION = 0x0001; /** Used with {@link #isSupported} to know whether the factory * supports {@link FunctionMapper#resolveClass} */ public static final int FEATURE_CLASS = 0x0002; /** Returns whether an feature is supported. * * @param feature which feature to query. * It can be a combination of {@link #FEATURE_FUNCTION} * and {@link #FEATURE_CLASS}. */ public boolean isSupported(int feature); /** Prepares (aka., compiles) an expression. * * @param ctx the context infomation to prepare the expression. * It can be null, in which case no functions are supported for this * invocation. * @param expression the expression to be evaluated. * @param expectedType the expected type of the result of the evaluation */ public Expression parseExpression(XelContext ctx, String expression, Class expectedType) throws XelException; /** Evaluates an expression. * * @param ctx the context information to evaluate an expression. * It can be null, in which case no functions are supported for this * invocation. * @param expression the expression to be evaluated. * Note: the expression is enclosed * with ${ and }, regardingless what implemetnation is used. * @param expectedType the expected type of the result of the evaluation */ public Object evaluate(XelContext ctx, String expression, Class expectedType) throws XelException;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -