⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simpleresolver.java

📁 非常接近C/S操作方式的Java Ajax框架-ZK 用ZK框架使你的B/S应用程序更漂亮更易操作。 官网:www.zkoss.org
💻 JAVA
字号:
/* SimpleResolver.java{{IS_NOTE	Purpose:			Description:			History:		Thu Oct 28 15:15:04     2004, Created by tomyeh}}IS_NOTECopyright (C) 2004 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.el;import java.util.Map;import javax.servlet.jsp.el.VariableResolver;import javax.servlet.jsp.el.ELException;/** * A simple resolver that retrieve variable from a map. * * @author tomyeh */public class SimpleResolver implements VariableResolver {	/** The parent resolver. */	protected final VariableResolver _parent;	/** The variable maps. */	protected final Map _vars;	/** Constructs a resolver. */	public SimpleResolver() {		this(null, null);	}	/** Constructs a resolver with a parent.	 * @param parent the parent resolver (null means ignored).	 */	public SimpleResolver(VariableResolver parent) {		this(parent, null);	}	/** Constructs a resolver with a parent and an object map.	 * @param parent the parent resolver (null means ignored).	 * @param vars the object map (null means ignored)	 */	public SimpleResolver(VariableResolver parent, Map vars) {		_parent = parent;		_vars = vars;	}	/** Constructs a resolver with an object map.	 * @param vars the object map (null means ignored)	 */	public SimpleResolver(Map vars) {		this(null, vars);	}	//-- VariableResolver --//	public Object resolveVariable(String name) throws ELException {		if (_vars != null) {			final Object o = _vars.get(name);			if (o != null)				return o;		}		return _parent != null ? _parent.resolveVariable(name): null;	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -