有人可以解释一下安装的 AspectJ 框架的 bin 目录中 aj5 和 aj 脚本的用途吗
这是 AspectJ 框架中包含 bin 文件夹的屏幕截图。
Here the screenshot of containing the bin folder in AspectJ framework.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它们用于加载时间编织< /a>.
aj5
适用于 java 5,aj
适用于 java 1.4。以下是 AspectJ 支持的编织类型:
编译时编织是最简单的方法。当您拥有应用程序的源代码时,ajc 将从源代码进行编译并生成编织类文件作为输出。编织器的调用是 ajc 编译过程中不可或缺的一部分。方面本身可以是源代码或二进制形式。如果受影响的类需要这些方面才能编译,则必须在编译时编织。方面是必需的,例如,当它们向类添加成员并且正在编译的其他类引用添加的成员时。
编译后编织(有时也称为二进制编织)用于编织现有的类文件和 JAR 文件。与编译时编织一样,用于编织的方面可以是源代码或二进制形式,并且它们本身可以由方面编织。
加载时编织 (LTW) 只是二进制文件编织会推迟到类加载器加载类文件并将该类定义到 JVM 为止。为了支持这一点,需要一个或多个“编织类加载器”,它们要么由运行时环境显式提供,要么通过“编织代理”启用。
They are for Load Time Weaving.
aj5
is for java 5,aj
is for java 1.4.Here is types of weaving supported by AspectJ:
Compile-time weaving is the simplest approach. When you have the source code for an application, ajc will compile from source and produce woven class files as output. The invocation of the weaver is integral to the ajc compilation process. The aspects themselves may be in source or binary form. If the aspects are required for the affected classes to compile, then you must weave at compile-time. Aspects are required, e.g., when they add members to a class and other classes being compiled reference the added members.
Post-compile weaving (also sometimes called binary weaving) is used to weave existing class files and JAR files. As with compile-time weaving, the aspects used for weaving may be in source or binary form, and may themselves be woven by aspects.
Load-time weaving (LTW) is simply binary weaving defered until the point that a class loader loads a class file and defines the class to the JVM. To support this, one or more "weaving class loaders", either provided explicitly by the run-time environment or enabled through a "weaving agent" are required.