My understanding is that ..
is 0-Many
args and *
is one arg of any
name. Is this correct?
Does aspectj support syntax like args(..,myArg,..)
?
What AspectJ does is always pretty much the same: It modifies Java byte code by weaving aspect code into it. In case 1 you just get one set of class files directly from ajc . Case 2.1 creates additional, new class files. Case 2.2 just creates new byte code in memory directly in the JVM.
AspectJ provides primitive pointcuts that capture join points at these times. These pointcuts use the dynamic types of their objects to pick out join points. They may also be used to expose the objects used for discrimination. this(Type or Id) target(Type or Id)
The @Aspect annotation on a class marks it as an aspect, and hence excludes it from auto-proxying.
To enable @AspectJ, spring AOP provides @EnableAspectJAutoProxy annotation which will be annotated in java configuration. To work with spring AOP and @AspectJ support, we need to create a class annotated with @Aspect annotation.
This is from AspectJ site: http://www.eclipse.org/aspectj/doc/next/progguide/semantics-pointcuts.html
*
represents any number of characters except "."
..
represents any number of characters including any number of "."
Update From AspectJ in Action - for method signatures:
In method signatures, the wildcard .. is used to denote any type and number of arguments taken by a method
*
specifies a single argument
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