What does aspectj-weaver.jar do? What are its common uses?
An aspect weaver takes information from raw classes and aspects and creates new classes with the aspect code appropriately weaved into the classes.
AspectJ is very mature, powerful and widely used in today's enterprise Java frameworks like Spring. Spring uses AspectJ to make it easy for the developers to use Transaction Management, or applying security (using Spring Security) in your application.
In this article, we'll look at answering these questions and introduce Spring AOP and AspectJ – the two most popular AOP frameworks for Java.
@AspectJ refers to a style of declaring aspects as regular Java classes annotated with annotations. The @AspectJ style was introduced by the AspectJ project as part of the AspectJ 5 release. Spring interprets the same annotations as AspectJ 5, using a library supplied by AspectJ for pointcut parsing and matching.
The jar is used in aspectj for aspect oriented programming or 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With