VIRGIN FOREST OF JAVA
不要埋头苦干,要学习,学习,再学习。。。。。
powered by R.Zeus

in hibernate , ASTPrinter receive the HqlTokenTypes  name by an int value.how did it do?
first ,useing Class.getFields to get all the fields,the use filed.get(null) to get the field's value that equals the int type will be returned.
so ,field.get(null) can return the field's value.if the parameter nonequals null,what it will return?
in addition,when use field.get(null),it use Modifier.isStatic( field.getModifiers() ) to check weather the filed is static.why it do this?if the field isn't static ,it will be what?
in my next test,
only public field can recieved by Class.getFields,even the page-privilege can't.
and only the static field can be return it's value when use
filed.get(null),else will be error.

posted on 2006-09-13 11:01 R.Zeus 阅读(284) 评论(0)  编辑  收藏 所属分类: Reflection

只有注册用户登录后才能发表评论。


网站导航: