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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? classes.java

?? 非常接近C/S操作方式的Java Ajax框架-ZK 用ZK框架使你的B/S應用程序更漂亮更易操作。 官網:www.zkoss.org
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* 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.CacheMap;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;	}	/**	 * 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;		char cc = signature.charAt(k);		if (cc != '(') {				//skip the return type			returnType = signature.substring(j, k).trim();			//			j = k;			k = signature.indexOf('(', j + 1);			if (k < 0)				throw new IllegalSyntaxException(signature);			}		String method = signature.substring(j, k).trim();				Collection argTypes = new LinkedList();		Collection argNames = new LinkedList();		do {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品1区2区3区| 亚洲精品一区二区三区四区高清| 懂色一区二区三区免费观看| 国产一区二区三区免费观看| 麻豆精品国产91久久久久久| 久久精品国产免费看久久精品| 五月天久久比比资源色| 午夜国产精品影院在线观看| 五月天亚洲婷婷| 精品一区二区三区香蕉蜜桃 | 欧美性大战久久| 成人av在线影院| 在线观看不卡视频| 91精品国产91综合久久蜜臀| 91精品婷婷国产综合久久性色| 精品国产一区二区三区久久久蜜月 | 欧美一级在线观看| 久久久久久久电影| 亚洲一区在线视频观看| 午夜激情一区二区| 风间由美性色一区二区三区| 色婷婷激情久久| 亚洲精品在线网站| 玉米视频成人免费看| 九色综合国产一区二区三区| 丁香五精品蜜臀久久久久99网站| 欧美精品xxxxbbbb| 中文字幕一区二| 蜜乳av一区二区| 欧美日韩一级二级| 最新国产成人在线观看| 奇米四色…亚洲| 欧美午夜精品一区二区三区| 亚洲精品一区二区三区影院| 亚洲一二三专区| 不卡一区二区在线| 日韩精品一区二区三区三区免费 | 欧美大片国产精品| 亚洲综合区在线| www.亚洲国产| 欧美极品aⅴ影院| 久久草av在线| 777亚洲妇女| 香蕉久久夜色精品国产使用方法| 成人妖精视频yjsp地址| 国产欧美一区二区三区在线看蜜臀| 蜜臀va亚洲va欧美va天堂| 欧美一区中文字幕| 国产在线播精品第三| 久久综合视频网| 91视频国产资源| 午夜国产不卡在线观看视频| 91精品国产综合久久婷婷香蕉 | 国产成人av电影在线| 国产精品久久二区二区| 91国偷自产一区二区开放时间| 五月天激情综合| 国产偷国产偷亚洲高清人白洁 | 日韩一级大片在线| 韩国v欧美v亚洲v日本v| 国产米奇在线777精品观看| 337p粉嫩大胆噜噜噜噜噜91av| 国产成人精品www牛牛影视| 亚洲免费视频成人| 日韩欧美一二区| 成人sese在线| 美女脱光内衣内裤视频久久网站 | 欧美精品1区2区3区| 国产精品一区二区不卡| 亚洲特黄一级片| 亚洲成人777| 2023国产一二三区日本精品2022| 成人av中文字幕| 九九九精品视频| 亚洲v中文字幕| 亚洲女人小视频在线观看| 精品国产精品网麻豆系列| 欧美系列在线观看| 成人av电影在线网| 国产麻豆精品在线| 免费成人在线网站| 亚洲亚洲人成综合网络| 国产精品视频线看| 国产亚洲精久久久久久| 欧美一二区视频| 欧美巨大另类极品videosbest| 成人永久免费视频| 国产一区二区久久| 久久精品国产99| 日本女优在线视频一区二区| 亚洲国产日韩a在线播放性色| 中文字幕欧美日本乱码一线二线| 精品盗摄一区二区三区| 26uuu亚洲综合色欧美| 日韩一区二区三区av| 91麻豆精品国产| 欧美不卡在线视频| 精品国产精品一区二区夜夜嗨| 日韩精品中文字幕在线不卡尤物 | 欧美精品 国产精品| 欧美无人高清视频在线观看| 成人av资源在线观看| 91麻豆国产在线观看| 欧洲色大大久久| 欧美精品 日韩| 精品国产网站在线观看| 国产日产欧美一区二区三区| 国产精品毛片大码女人| 玉米视频成人免费看| 日韩国产在线观看一区| 国产精品影视在线| 欧美图片一区二区三区| 亚洲精品一二三| 日本视频一区二区| 99精品视频中文字幕| 精品视频免费看| 国产视频一区在线观看| 一区二区三区久久| 国产精品1区2区| 欧美中文一区二区三区| 欧美xxxxx牲另类人与| 亚洲欧美日韩中文字幕一区二区三区| 性感美女久久精品| 成人av在线资源网| 久久一二三国产| 亚洲伊人色欲综合网| 国产传媒日韩欧美成人| 欧美蜜桃一区二区三区| 国产欧美一区视频| 三级在线观看一区二区 | 亚洲蜜臀av乱码久久精品蜜桃| 亚洲国产wwwccc36天堂| 蜜臀av性久久久久蜜臀aⅴ | 国产91丝袜在线播放0| 欧美在线综合视频| 日本美女一区二区三区| 国产精品原创巨作av| 7777女厕盗摄久久久| 亚洲色图欧洲色图| 亚洲国产精品精华液网站| 岛国av在线一区| 91精品国产麻豆国产自产在线 | 中文字幕第一区二区| 美女久久久精品| 欧美日韩国产一级| 亚洲欧美中日韩| 国产在线视视频有精品| 欧美亚州韩日在线看免费版国语版| 337p粉嫩大胆色噜噜噜噜亚洲| 日本人妖一区二区| 97精品久久久久中文字幕| 久久久久久久久久久久久夜| 秋霞电影网一区二区| 91网站在线播放| 亚洲色图视频免费播放| eeuss鲁片一区二区三区在线看| 欧美一区二区三区日韩| 亚洲成人av一区| 欧美精品在线一区二区| 亚洲va国产va欧美va观看| 色久优优欧美色久优优| 国产精品乱人伦| 99re66热这里只有精品3直播| 亚洲天堂精品视频| 99在线精品免费| 亚洲一区二区三区视频在线播放| 一本色道久久综合亚洲精品按摩| 中文字幕二三区不卡| 色综合中文综合网| 亚洲国产欧美在线人成| 欧美亚一区二区| 天天爽夜夜爽夜夜爽精品视频| 99re成人在线| 一区二区三区美女| 精品久久久久久久人人人人传媒 | 欧美一区二区三区免费观看视频| 午夜精品免费在线观看| 精品视频在线看| 国精产品一区一区三区mba桃花 | 五月天激情小说综合| 日韩美女视频在线| 97精品久久久午夜一区二区三区| 亚洲天堂av一区| 欧美一区二区三区在| 成人黄色电影在线| 亚洲综合在线观看视频| 日韩一级在线观看| 欧美亚洲国产一区二区三区va| 美女在线观看视频一区二区| 国产精品视频第一区| 欧美日韩中文字幕一区| 国产成人综合自拍| 日本午夜一本久久久综合| 玉米视频成人免费看| 久久精品欧美一区二区三区不卡 | 视频一区视频二区中文字幕| 国产日本亚洲高清| 精品国产乱码久久久久久1区2区 | 国产另类ts人妖一区二区| 亚洲美女免费在线|