Even the list of classes being processed is nearly the same, despite the different technique used for intercepting the classloading 被处理的类列表几乎是相同的,只是用于截取类加载的技术不同。
There s a subtle problem involved in making this substitution work properly that goes back to the discussion of classloading in 要想让这种取代可以正确工作,会涉及到一个微妙的问题,它可追溯到本系列
This implementation involves three separate pieces of code : intercepting the classloading, accessing the annotation information, and the actual transformation 方法。该实现涉及三个单独的代码段:截获classloading、访问注释信息和实际转换。
The parent last classloader mode causes the classloader to first attempt to load classes from its local classpath before delegating the classloading to its parent parent_lastclassloader模式会导致类装载器在装载到父类之前首先尝试从自身的类路径装载类。
Instance . because the current code will only work with j2se 5.0 due to the use of the instrumentation methods to intercept classloading, i could have used the new 因为当前的代码将只使用j2se5.0(由于使用了instrumentation方法来截获classloading),所以我本应该使用新的
As you can see, the jvm s runtime classloading can be nested quite deeply; for performance purposes you ll generally focus on the code leading up to the classloader calls, similar to the highlighted portion of the stack trace shown in figure 5 如您可以看到的,jvm运行期的类加载可以嵌套得相当深;出于性能目的您通常应该关注那些引起类加载器调用的代码,像图5中显示的栈记录的高亮部分。