一个简单的visio程序。

源代码在线查看: obj.java

软件大小: 1263 K
上传用户: qqwoshi
关键词: visio 程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				package HAB.HcBean;
				
				import java.lang.reflect.*;
				import HPCore.Exception.HpException;
				import HAB.HcBean.HalcyonAppletBeanInterface;
				
				public class Obj 
				{
				    public static Object CreateObject(String obj) throws HpException 
					{
				     try
					  {
				        return CreateObject(null,obj);
				      }
					 catch(Exception he)
					  {
				        throw new HpException(0,"Couldn't instanceof  "+obj);
				      }
				    }
				
				    public static Object CreateObject(java.awt.Container con,String obj) throws HpException 
					{
					  Object returnObj = null;
				      try
					   {
					     Class c = Class.forName(obj);
					     if (c != null)
					     {
					       returnObj = c.newInstance();
					     }
					   }
					 catch (Throwable ex)
					   {
				        throw new HpException(0,"Couldn't instanceof  "+obj);
					   }
				
					 if (returnObj == null)
					 {
					   throw new HpException(0,"Couldn't instanceof  "+obj);
					 }
				
					 if (returnObj instanceof HalcyonAppletBeanInterface)
					 {
					   return returnObj;
					 }
					 else
					 {
					  try
					  {
					   java.beans.BeanInfo bi = java.beans.Introspector.getBeanInfo(returnObj.getClass());
					  }
					  catch (Throwable ex)
					  {
					    throw new HpException(0,"Couldn't instanceof  "+obj);
					  }
					  return returnObj;
					 }
				   }
				}
							

相关资源