java aspectj-weaver.jar 有什么作用?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5304155/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What does aspectj-weaver.jar do?
提问by Nook
What does aspectj-weaver.jar do? What are its common uses?
aspectj-weaver.jar 有什么作用?它的常见用途是什么?
回答by Brandon
The jar is used in aspectj for aspect oriented programming or AOP.
在aspectj 中使用jar 进行面向方面的编程或AOP。
The weaver is the piece that actually "weaves" together the aspects/point-cuts/join-points defined with the code that is to be executed in each instance.
编织器实际上是将使用要在每个实例中执行的代码定义的方面/切入点/连接点“编织”在一起的部分。
回答by kriegaex
The answers here are not really clear (even though schnaader's link to a README points to the right info), so I am going to add a more precise one:
这里的答案不是很清楚(尽管 schnaader 的 README 链接指向了正确的信息),所以我将添加一个更精确的答案:
aspectjweaver.jaris an AspectJlibrary needed for LTW (load-time weaving), as opposed to compile-time weaving.
aspectjweaver.jar是LTW(加载时编织)所需的AspectJ库,与编译时编织相反。