📄 obj.java
字号:
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;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -