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

📄 testreflector.java

📁 基于数据库操作的封装
💻 JAVA
字号:
package org.shaoye.magic;

import org.shaoye.magic.reflector.Reflector;
import java.util.Hashtable;
import org.shaoye.magic.TestObj;

/**
 * @author zhangt
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public class TestReflector {

	public static void main(String[] args) {
		
		Hashtable hash = new Hashtable();
		hash.put("name","zhang_tao");
		hash.put("id","zhang_t");		
		hash.put("age","25");		
		hash.put("gender","male");		
		
		Reflector reflector = new Reflector("org.shaoye.magic.TestObj",hash);
		
		TestObj testObj = new org.shaoye.magic.TestObj();
		
		try
		{
		
			testObj = ( TestObj )reflector.runReflect();
			
			System.out.println( testObj.getId() );
		}
		catch( Exception ex )	
		{
			ex.printStackTrace();
		}	
		
	}
}

⌨️ 快捷键说明

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