Java有着一个非常突出的动态机制:Reflection。这个字的意思是“反射、映象、倒影”, 用在Java身上指的是我们可以于运行时加载、探知、 使用编译期间完全未知的classes。 即,Java程序可以加载一个运行时才得知名称的class,获悉其完整构造(但不包括methods定 义), 并生成其对象实体、或对其fields设值、或唤起其methods1。 这种“看透class”的能力(the ability of the program to examine itself) 被称为in
java有着一个非常突出的动态相关机制:Reflection。这个字的意思是“反射、映象、倒影”,用在Java身上指的是我们可以于运行时加载、探知、使用编译期间完全未知的classes。换句话说,Java程序可以加载一个运行时才得知名称的class,获悉其完整构造(但不包括methods定义),并生成其对象实体、或对其fields设值、或唤起其methods1。这种“看透class”的能力(the ability of the program to examine itself)被称为intr
Java Reflection in Action is unique in presenting a clear account of all the cool things you can do with reflection, and at the same time pro- viding the sound conceptual basis that developers need to create advanced applications. The book includes