亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? classes.java

?? ZK 基礎(chǔ)介紹 功能操作 模塊 結(jié)合數(shù)據(jù)庫(kù)操作
?? JAVA
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* Classes.java{{IS_NOTE	Purpose: Utilities to handle Class	Description:	History:	 2001/4/19, Tom M. Yeh: Created.}}IS_NOTECopyright (C) 2001 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.lang;import java.util.Map;import java.util.HashMap;import java.util.List;import java.util.LinkedList;import java.util.Collection;import java.util.Arrays;import java.util.Date;import java.lang.reflect.Constructor;import java.lang.reflect.AccessibleObject;import java.lang.reflect.Method;import java.lang.reflect.Field;import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Modifier;import java.math.BigDecimal;import java.math.BigInteger;import org.zkoss.mesg.MCommon;import org.zkoss.mesg.Messages;import org.zkoss.lang.Strings;import org.zkoss.lang.Objects;import org.zkoss.math.BigDecimals;import org.zkoss.math.BigIntegers;import org.zkoss.util.MultiCache;import org.zkoss.util.Cache;import org.zkoss.util.IllegalSyntaxException;import org.zkoss.util.logging.Log;/** * Utilities to handle java.lang.Class * * @author tomyeh */public class Classes {	private static final Log log = Log.lookup(Classes.class);	/**	 * Creates and intializes a new instance of the specified class with	 * the specified arguments.	 *	 * <p>Note only public constructors are searched.	 *	 * @param cls the class of the instance to create	 * @param argTypes the argument types of the constructor to inovke	 * @param args the arguments to initialize the instance	 * @return the new instance	 *	 * @exception NoSuchMethodException if a matching method is not found	 * @exception InstantiationException if the class that declares the	 * underlying constructor represents an abstract class	 * @exception InvocationTargetException if the underlying constructor	 * throws an exception	 * @see #newInstance(String, Class[], Object[])	 */	public static final	Object newInstance(Class cls, Class[] argTypes, Object[] args)	throws NoSuchMethodException, InstantiationException,	InvocationTargetException {	 	Constructor contr = cls.getConstructor(argTypes);	 	try {	 		return contr.newInstance(args);	 	} catch (IllegalAccessException ex) {	 		throw SystemException.Aide.wrap(ex);	 	}	}	/**	 * Creates and initializes a new instance of the specified class name	 * with the specified arguments.	 *	 * <p>It uses Class.forName to get the class.	 *	 * @param clsName the class name of the instance to create	 * @param argTypes the argument types of the constructor to inovke	 * @param args the arguments to initialize the instance	 * @return the new instance	 *	 * @exception NoSuchMethodException if a matching method is not found	 * @exception InstantiationException if the class that declares the	 * underlying constructor represents an abstract class	 * @exception InvocationTargetException if the underlying constructor	 * throws an exception	 * @exception ClassNotFoundException if the specified class name is not a class	 * @see #newInstance(Class, Class[], Object[])	 */	public static final Object	newInstance(String clsName, Class[] argTypes, Object[] args)	throws NoSuchMethodException, InstantiationException,	InvocationTargetException, ClassNotFoundException {	 	return newInstance(Class.forName(clsName), argTypes, args);	}	/**	 * Creates and initializes a new instance of the specified class name	 * with the specified arguments, by use of {@link #forNameByThread}.	 *	 * <p>It uses {@link #forNameByThread} to get the class.	 *	 * @param clsName the class name of the instance to create	 * @param argTypes the argument types of the constructor to inovke	 * @param args the arguments to initialize the instance	 * @return the new instance	 *	 * @exception NoSuchMethodException if a matching method is not found	 * @exception InstantiationException if the class that declares the	 * underlying constructor represents an abstract class	 * @exception InvocationTargetException if the underlying constructor	 * throws an exception	 * @exception ClassNotFoundException if the specified class name is not a class	 * @see #newInstance(Class, Class[], Object[])	 */	public static final Object	newInstanceByThread(String clsName, Class[] argTypes, Object[] args)	throws NoSuchMethodException, InstantiationException,	InvocationTargetException, ClassNotFoundException {	 	return newInstance(forNameByThread(clsName), argTypes, args);	}	/**	 * Creates and initializes a new instance of the specified class name	 * with default constructor, by use of {@link #forNameByThread}.	 */	public static final Object newInstanceByThread(String clsName)	throws NoSuchMethodException, InstantiationException,	InvocationTargetException, ClassNotFoundException {		return newInstance(forNameByThread(clsName), null, null);	}	/**	 * Returns the Class object of the specified class name, using	 * the current thread's context class loader.	 *	 * <p>In additions, it handles the primitive types, such as int and double.	 *	 * @param clsName fully qualified name of the desired class	 * @return the Class object representing the desired class	 * @exception ClassNotFoundException if the class cannot be located by the specified class loader	 */	public static final Class forNameByThread(String clsName)	throws ClassNotFoundException {		clsName = toInternalForm(clsName);		final Class cls = Primitives.toClass(clsName);		return cls != null ? cls:			Class.forName(clsName, true, Thread.currentThread().getContextClassLoader());	}	/**	 * Change class name to internal form (e.g. byte[] -> [B). If already in	 * internal form, then just return it.	 */	public static final String toInternalForm(String clsName) {		final int k = clsName.indexOf('[');		if (k <= 0) { //not an array, or already in internal form			return clsName;	//just return		}		//component class		final String elm = clsName.substring(0, k).trim();		if (elm.length() == 0)			throw new IllegalArgumentException("Not a legal class name: \""+clsName+'"');		//array depth		boolean leftb = false;		final String stub = clsName.substring(k);		final StringBuffer sb = new StringBuffer(128);		for (int j = 0; j < stub.length(); j++) {			final char ch = stub.charAt(j);			if (ch == '[') {				if (leftb)					throw new IllegalArgumentException("Not a legal class name: \""+clsName+'"');				leftb = true;				sb.append('[');			} else if (ch == ']') {				if (!leftb)					throw new IllegalArgumentException("Not a legal class name: \""+clsName+'"');				leftb = false;			}		}		if (leftb)			throw new IllegalArgumentException("Not a legal class name: \""+clsName+'"');		final char code = Primitives.getNotation(elm);		if (code != (char)0) {//primitive array			sb.append(code);		} else {//object array			sb.append('L').append(elm).append(';');		}		return sb.toString();	}	/**	 * Gets the topmost interface of the specified class or interface that	 * implements or extends the specified interface.	 * For example, if A extends B, and C implements A,	 * then getTopInterface(C, B) returns A.	 *	 * <p>The interfaces implemented by the specified class is checked first,	 * and then the subclass.	 *	 * @param cls the class or interface	 * @param subIF the sub-interface	 * @return the topmost interface extending subIF, or null if subIF	 * is not implemented by cls	 */	public static Class getTopmostInterface(Class cls, Class subIF) {		if (cls.isInterface())			return subIF.isAssignableFrom(cls) ? cls: null;		while (cls != null) {			final Class[] ifs = cls.getInterfaces();			for (int j = 0; j < ifs.length; ++j)				if (subIF.isAssignableFrom(ifs[j]))					return ifs[j];			cls = cls.getSuperclass();		}		return null;	}	/** Returns all interfaces that are implemented by the specified class.	 * <p>Unlike {@link Class#getInterfaces}, it recursively searches	 * for all derived classes.	 */	public static Class[] getAllInterfaces(Class cls) {		final List l = new LinkedList();		while (cls != null) {			final Class[] ifs = cls.getInterfaces();			for (int j = 0; j < ifs.length; ++j)				l.add(ifs[j]);			cls = cls.getSuperclass();		}		final int sz = l.size();		return (Class[])l.toArray(new Class[sz]);	}			/**	 * Tests whether a class contains the specified method.	 * Only public methods are tested.	 *	 * @param cls the class to test	 * @param name the method name	 * @param paramTypes the list of parameter types	 * @return true if it contains the method	 */	public static final boolean containsMethod	(Class cls, String name, Class[] paramTypes) {		try {			cls.getMethod(name, paramTypes);			return true;		} catch (NoSuchMethodException ex) {//no found			return false;		}	}	/** Corrects a string to a valid Java name.	 * Currently, it only removes '-' and capitalizes the succeeding	 * character. Example, 'field-name' becomes 'fieldName'.	 */	public final static String correctFieldName(String name) {		int j = name.indexOf('-');		if (j < 0)			return name; //nothing to change		for (final StringBuffer sb = new StringBuffer(name);;) {			sb.deleteCharAt(j);			if (sb.length() == j)				return sb.toString();			sb.setCharAt(j, Character.toUpperCase(sb.charAt(j)));			j = sb.indexOf("-", j);			if (j < 0)				return sb.toString();		}	}	/**	 * Convert an attribute name, returned by toAttributeName, to	 * a method name.	 *	 * <p>toMethodName("true", "is") => "isTrue"<br>	 * toMethodName("true", "") => "true"	 *	 * @param attrName the attribute name	 * @param prefix the prefix; one of is, get and set	 * @return the method name	 * @see #toAttributeName	 */	public static final String toMethodName(String attrName, String prefix) {		if (prefix.length() == 0)			return attrName;		StringBuffer sb = new StringBuffer(prefix);		char[] buf = attrName.toCharArray();		buf[0] = Character.toUpperCase(buf[0]);		return sb.append(buf).toString();	}	/**	 * Tests if a method name is an attribute, i.e., prefixing with is,	 * get or set. Caller could then test if it is a setter or getter	 * by charAt(0)=='s'.	 *	 * <p>Note 'set' is considered as an attribute, whose name is an	 * empty string.	 *	 * @param methodName the method name to test	 * @return true if it is setter or getter	 */	public static final boolean isAttribute(String methodName) {		int len = methodName.length();		if (len < 2)			return false;		int j;		switch (methodName.charAt(0)) {		case 's':		case 'g':			if (len<3 || methodName.charAt(1)!='e' || methodName.charAt(2)!='t')				return false;			j = 3;			break;		case 'i':			if (methodName.charAt(1)!='s')				return false;			j = 2;			break;		default:			return false;		}		return j==len || Character.isUpperCase(methodName.charAt(j));	}	/**	 * Converts a method name to an attribute name by removing the prefix	 * is, get or set, or null if it doesn't start with is, get or set.	 *	 * <p>The code is optimized for better performance.	 *	 * @param methodName the method name	 * @return the attribute name; null if it is not an attribute name	 * @see #toMethodName	 */	public static final String toAttributeName(String methodName) {		int len = methodName.length();		if (len < 2)			return null;		int j;		switch (methodName.charAt(0)) {		case 's':		case 'g':			if (len<3 || methodName.charAt(1)!='e' || methodName.charAt(2)!='t')				return null;			j = 3;			break;		case 'i':			if (methodName.charAt(1)!='s')				return null;			j = 2;			break;		default:			return null;		}		if (j==len || Character.isUpperCase(methodName.charAt(j))) {			char[] buf = new char[len - j];			if (buf.length>0) {				methodName.getChars(j, len, buf, 0);				buf[0] = Character.toLowerCase(buf[0]);			}			return new String(buf);		}		return null;	}	//--Support Class--	/**The method info class used for {@link #parseMethod(String signature)}.	 * This info describe the method return type, method name and two collections for	 * arguments type and arguments name;	 */	public static class MethodInfo {		/** The return type (class name), or null if no specified. */		public String returnType;		public String method;		public String[] argTypes;		public String[] argNames;		public String throwsEx;				//constructor		protected MethodInfo(String r, String m, String[] argTs, String[] argNs, String tEx) {			returnType = r;			method = m;			argTypes = argTs;			argNames = argNs;			throwsEx = tEx;		}	}	/**	 * Gets the method information from a signature. 	 * It returns a method info with the return type, method name and two collections 	 * of arguments type and arguments name.	 *	 * @param signature the method signature.	 * @return MethodInfo The method information including return type, method name	 *			and two collections for argument type annd arguments name.	 */	public static final MethodInfo parseMethod(String signature) 	throws IllegalSyntaxException {		int len = signature.length();		int j = Strings.skipWhitespaces(signature, 0);		int k = Strings.anyOf(signature, "( \t\n\r", j);		k = Strings.skipWhitespaces(signature, k);		if (k >= len)			throw new IllegalSyntaxException(signature);				String returnType = null;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本美女一区二区三区| 成人avav影音| 日本中文字幕一区二区视频| 亚洲激情五月婷婷| 亚洲欧美电影院| 亚洲欧美另类久久久精品| 国产精品第一页第二页第三页| 国产欧美中文在线| 日本一区二区三区四区在线视频| 久久亚洲免费视频| 中文字幕+乱码+中文字幕一区| 国产欧美一区二区精品性色| 亚洲国产岛国毛片在线| 国产精品色哟哟网站| 中文字幕一区二区三区乱码在线| 国产午夜精品一区二区三区视频 | 久久99深爱久久99精品| 蜜臀a∨国产成人精品| 美日韩一级片在线观看| 国产最新精品免费| 成人性生交大片免费看视频在线| 成人91在线观看| 在线一区二区视频| 91精品国产综合久久香蕉的特点| 欧美一区二区三区日韩| 2022国产精品视频| 中文字幕欧美三区| 一区二区三区在线看| 亚洲福中文字幕伊人影院| 天天综合天天做天天综合| 久久精品久久精品| 高清beeg欧美| 在线免费视频一区二区| 欧美一区二区性放荡片| 久久蜜桃一区二区| 成人免费在线视频| 午夜精品影院在线观看| 久久99国产精品免费网站| 粉嫩绯色av一区二区在线观看| 91蜜桃免费观看视频| 精品视频色一区| 久久嫩草精品久久久久| 亚洲精品自拍动漫在线| 日本女人一区二区三区| 成人黄色在线看| 欧美日韩国产综合视频在线观看| 欧美精品一区二区三区蜜桃| 综合欧美一区二区三区| 丝袜亚洲另类欧美综合| 国产精品影视在线观看| 欧美专区日韩专区| 久久人人97超碰com| 亚洲欧美日韩精品久久久久| 奇米影视在线99精品| av在线一区二区三区| 欧美一区二区三区四区久久| 中文字幕中文在线不卡住| 日韩av中文字幕一区二区三区| 国产成人av一区二区三区在线观看| 色又黄又爽网站www久久| 日韩欧美精品在线| 亚洲精品免费看| 黄一区二区三区| 欧美色精品天天在线观看视频| 久久久国产午夜精品| 午夜国产精品一区| 波波电影院一区二区三区| 8x8x8国产精品| 亚洲三级在线免费| 国产成人免费高清| 日韩欧美一二三四区| 夜夜嗨av一区二区三区| 波多野结衣一区二区三区 | 亚洲欧美一区二区三区极速播放 | 亚洲一二三区在线观看| 日韩精品欧美精品| 成人免费高清在线| 久久综合久久久久88| 亚洲国产精品一区二区久久恐怖片| 另类小说视频一区二区| 一道本成人在线| 久久精品亚洲一区二区三区浴池| 亚洲精品免费看| 亚洲国产精品久久久久婷婷884| 91麻豆.com| 精品成人一区二区| 午夜精品福利一区二区蜜股av| 国产电影一区二区三区| 56国语精品自产拍在线观看| 中文字幕在线一区| 韩国一区二区在线观看| 91色九色蝌蚪| 亚洲欧美综合在线精品| 国模无码大尺度一区二区三区| 欧美日韩一区二区在线观看 | 老鸭窝一区二区久久精品| 91亚洲精品乱码久久久久久蜜桃 | 亚洲欧美视频一区| 不卡区在线中文字幕| 亚洲精品在线观| 免费观看久久久4p| 4438成人网| 亚洲高清久久久| 在线观看av不卡| 亚洲三级电影全部在线观看高清| 日韩国产高清影视| 欧美日韩国产一级| 亚洲大片精品永久免费| 一本色道久久综合精品竹菊| 中文欧美字幕免费| 国产黄色91视频| 精品国产精品网麻豆系列| 午夜天堂影视香蕉久久| 日本乱人伦aⅴ精品| 亚洲视频在线观看一区| 一区二区三区久久| 亚洲色图制服诱惑 | 久久精品一区二区三区四区| 蜜乳av一区二区三区| 欧美一区二区三区四区在线观看| 五月婷婷激情综合| 色婷婷激情一区二区三区| 亚洲一本大道在线| 在线观看日韩电影| 一区二区在线电影| 欧洲精品一区二区| 亚洲综合成人在线| 欧美日韩综合在线| 国产精品不卡视频| 欧美日韩二区三区| 日韩中文字幕一区二区三区| 91精品婷婷国产综合久久| 天天色 色综合| 日韩一区二区三区在线观看| 蜜臀91精品一区二区三区| 欧美岛国在线观看| 国产精品白丝jk黑袜喷水| 国产视频一区二区在线观看| 国内国产精品久久| 中文字幕精品综合| 色综合久久88色综合天天免费| 久久先锋影音av| 在线亚洲一区观看| 午夜av一区二区| 精品va天堂亚洲国产| 成人一级片在线观看| 亚洲精品老司机| 91色.com| 韩国一区二区三区| 中文字幕五月欧美| 欧美日韩国产成人在线免费| 男人的天堂久久精品| 欧美精品一区二区三区四区| 国产高清在线精品| 亚洲成人777| 精品蜜桃在线看| 白白色亚洲国产精品| 亚洲第一主播视频| 欧美电视剧在线观看完整版| 国产成人在线电影| 日韩成人午夜精品| 国产亚洲午夜高清国产拍精品| av午夜一区麻豆| 日本少妇一区二区| 国产精品久久久久久福利一牛影视| 91九色最新地址| 国产精品18久久久久久vr| 一区二区三区四区五区视频在线观看| 欧美肥妇bbw| www.日本不卡| 热久久一区二区| 国产欧美日韩另类视频免费观看| 在线观看日韩毛片| 在线欧美日韩国产| 国产一区二区按摩在线观看| 最新热久久免费视频| 日韩区在线观看| 91丨九色丨蝌蚪富婆spa| 国产剧情一区在线| 亚洲自拍偷拍网站| 国产日韩精品一区二区三区| 在线亚洲免费视频| 国产激情一区二区三区| 亚洲午夜精品一区二区三区他趣| 国产三级精品三级在线专区| 欧美老女人第四色| 91视频在线观看| 国产精品夜夜爽| 日本欧美加勒比视频| 国产精品免费av| 欧美国产一区视频在线观看| 欧美久久久久久蜜桃| av在线播放成人| 国产乱人伦偷精品视频免下载| 亚洲高清免费观看| 久久影院视频免费| 久久亚区不卡日本| 日韩欧美视频一区| 欧美日韩国产欧美日美国产精品| 成人av在线网|