編程生活
::
首頁
::
新隨筆
::
聯系
::
聚合
::
管理
::
113 隨筆 :: 0 文章 :: 18 評論 :: 0 Trackbacks
<
2009年8月
>
日
一
二
三
四
五
六
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
留言簿
(5)
給我留言
查看公開留言
查看私人留言
隨筆檔案
2013年8月 (1)
2013年7月 (2)
2012年6月 (4)
2012年5月 (1)
2012年4月 (2)
2012年3月 (1)
2012年2月 (1)
2009年8月 (2)
2009年1月 (1)
2008年12月 (2)
2008年8月 (2)
2008年6月 (8)
2008年4月 (2)
2008年3月 (1)
2008年1月 (4)
2007年12月 (6)
2007年11月 (15)
2007年10月 (17)
2007年9月 (7)
搜索
積分與排名
積分 - 186820
排名 - 310
最新評論
1.?re: eclipse.ini內存設置
那4g內存怎么配置?
--將i占
2.?re: log4j的ConversionPattern參數的格式含義
@輔導費
呵呵
--eval
3.?re: log4j的ConversionPattern參數的格式含義
@Hacken
你猜。。
--輔導費
4.?re: eclipse.ini內存設置[未登錄]
using...
--blue
5.?re: log4j的ConversionPattern參數的格式含義[未登錄]
#1 定義了兩個輸出端
log4j.rootLogger = INFO, A1, A2,A3
此處怎么會是兩個輸出端呢???
--Hacken
java動態創建Enum
public
class
DayFactory
{
static
{
try
{
Constructor con
=
Day.
class
.getDeclaredConstructors()[
0
];
Method[] methods
=
con.getClass().getDeclaredMethods();
for
(Method m : methods)
{
if
(m.getName().equals(
"
acquireConstructorAccessor
"
))
{
m.setAccessible(
true
);
m.invoke(con,
new
Object[
0
]);
}
}
Field[] fields
=
con.getClass().getDeclaredFields();
Object ca
=
null
;
for
(Field f : fields)
{
if
(f.getName().equals(
"
constructorAccessor
"
))
{
f.setAccessible(
true
);
ca
=
f.get(con);
}
}
Method m
=
ca.getClass().getMethod(
"
newInstance
"
,
new
Class[]
{ Object[].
class
}
);
m.setAccessible(
true
);
Day v
=
(Day) m.invoke(ca,
new
Object[]
{
new
Object[]
{
"
VACATION
"
, Integer.MAX_VALUE }
}
);
System.out.println(v.getClass()
+
"
:
"
+
v.name()
+
"
:
"
+
v.ordinal());
for
(Day day:Day.values())
{
System.out.println(day);
}
}
catch
(Exception ex)
{
ex.printStackTrace();
}
}
public
static
void
say()
{
}
@Test
public
void
ddd()
{
DayFactory.say();
}
posted on 2009-08-19 09:07
wilesun
閱讀(1507)
評論(0)
編輯
收藏
新用戶注冊
刷新評論列表
只有注冊用戶
登錄
后才能發表評論。
網站導航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
Powered by:
BlogJava
Copyright © wilesun
主站蜘蛛池模板:
浦县
|
苍溪县
|
德昌县
|
诸暨市
|
绥宁县
|
泽州县
|
土默特左旗
|
藁城市
|
盐源县
|
德安县
|
宜宾市
|
通河县
|
镇安县
|
婺源县
|
芦溪县
|
民权县
|
浦县
|
晋宁县
|
黄骅市
|
吉林市
|
图们市
|
玉环县
|
绥化市
|
淳安县
|
沈阳市
|
曲阳县
|
崇文区
|
广西
|
辉县市
|
东阳市
|
榆林市
|
织金县
|
射阳县
|
嘉黎县
|
叙永县
|
木兰县
|
湖州市
|
慈利县
|
阳山县
|
灵寿县
|
滦南县
|