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

📄 variables.java

📁 非常接近C/S操作方式的Java Ajax框架-ZK 用ZK框架使你的B/S应用程序更漂亮更易操作。 官网:www.zkoss.org
💻 JAVA
字号:
/* Variables.java{{IS_NOTE	Purpose:			Description:			History:		Tue Aug  2 15:03:50     2005, Created by tomyeh}}IS_NOTECopyright (C) 2005 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.zk.ui.sys;import java.util.Set;import java.util.HashSet;import java.util.Collections;/** * variables utilities. * * @author tomyeh */public class Variables {	private Variables() {}	private static final Set _reves;	static {		Set reves = new HashSet();		final String[] rs = new String[] {			"arg", "desktop", "event", "page", "self", "session",			"spaceOwner"		};		for (int j = rs.length; --j >=0;)			reves.add(rs[j]);		_reves = Collections.unmodifiableSet(reves);	}	/** Returns a set of readonly reserved words.	 */	public static final Set getReservedNames() {		return _reves;	}	/** Returns whether the specified is valid.	 * It also invokes {@link #isReserved}.	 */	public static final boolean isValid(String name) {		if (ComponentsCtrl.isAutoId(name) || isReserved(name))			return false;		for (int j = name.length(); --j >= 0;) {			final char cc = name.charAt(j);			if ((cc < '0' || cc > '9') && (cc < 'a' || cc > 'z')			&& (cc < 'A' || cc > 'Z') && cc != '_')				return false;		}		return true;	}	/** Returns whether the specified name is reserved.	 * If true, you cannot use it in BSH (and EL).	 */	public static final boolean isReserved(String name) {		return _reves.contains(name);	}}

⌨️ 快捷键说明

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