java.lang.instrument 包 the AOP

https://mp.weixin.qq.com/s?__biz=MzUzMTA2NTU2Ng==&mid=2247487368&idx=1&sn=408c385d26083803e1a2a742bd301531&chksm=fa497039cd3ef92fcb8274f47130a90c3f9cf11b87b3b73054c20a7693021fb541a27bdf3c8f&mpshare=1&scene=1&srcid=0726C0dbs4R8kkHn1jG1zDK3&sharer_sharetime=1564316461171&sharer_shareid=b3ce2a829d6ac5a5c95b19a19559bab0&key=c1a84807be422668bf1a554d0cdfb3ecd67773641f76efc9a3fa110d4a94c319cf133ab80a19fe139053ae687bcfe6542c40e6f6a9ed8fd931c8aa10d07968a12690c6b87d1f463c027503089471a83c&ascene=0&uin=MTA2NzUxMDAyNQ%3D%3D&devicetype=iMac+MacBookAir6%2C2+OSX+OSX+10.10.5+build(14F2511)&version=11020012&lang=zh_CN&pass_ticket=uyNMv3dkU5lVbMU78UD3%2BXwjTGdkQzT8UBGxvcyQkuNJFvEWu4%2FLP%2Bvxng0jP1ai

二、LTW(Load Time Weaving)

In fact, in addition to woven into the outer section of the run, there is a way we performed an aspect weaving, it may be by converting byte code of loaded classes , and then woven into a target entry point (target class), this approach is the LTW, i.e., the static agent (also referred to as proxy waiting enhanced when compiling , there will be related later in the code example).

LTW at Java5 when it was introduced, and want to understand the principle, one should first understand a knowledge --Instrument package.

Guess you like

Origin www.cnblogs.com/silyvin/p/11260965.html
AOP