一个用于查看log4j结果的很方便的工具:
http://logging.apache.org/chainsaw/download.html
chainsaw
2008年4月16日星期三
2008年1月25日星期五
通过类名判断一个对象是否为其实例
public static boolean instanceOf(Object a, String className)
throws ClassNotFoundException {
boolean result = false;
Class clazz = LangUtil.class.getClassLoader().loadClass(className);
try {
clazz.cast(a);
result = true;
} catch (ClassCastException e) {
}
return result;
}
throws ClassNotFoundException {
boolean result = false;
Class clazz = LangUtil.class.getClassLoader().loadClass(className);
try {
clazz.cast(a);
result = true;
} catch (ClassCastException e) {
}
return result;
}
2008年1月10日星期四
订阅:
博文 (Atom)