advice « aspectj « Java Enterprise Q&A





1. Using join points call(* *.*(..)), can I expose the arguments to the advice if available?    stackoverflow.com

With my aspect, I track the changes on certain collections by advising certain method calls on instances of java.util.Set, notably add(Object) and remove(Object). Since the changes are not reflected in the ...

2. Is it possible to get information about which advice has been caught in an adviceexecution pointcut?    stackoverflow.com

I have an aspect in my application that intercepts every advice execution on the system. I want to be able to identify which advice is being "intercepted" by my adviceexecution pointcut ...

3. Check whether advice is applied    stackoverflow.com

Consider I wrote AOP pointcut and made a misprint in it:

@Pointcut("within(com.example.servic..*)")
public void serviceMethod() {}
There is "servic" instead of "service". I am going to use this pointcut to apply security check before service ...

4. Help with around advice - AspectJ pointcuts    stackoverflow.com

I'm stuck again..... i have to enforce a policy issuing a warning if items not belonging to a particular category are being added, apart from the three which are allowed and ...

5. Policy enforcement to add a new item - ASPECTJ    stackoverflow.com

I have to enforce a policy issuing a warning if items not belonging to a particular category are being added, apart from the three which are allowed and disallowing such additions..... So ...

6. AspectJ - Is it possible to catch execution of an advice?    stackoverflow.com

I have a CachingAspect which performs some simple caching on properly annotated methods using an around advice. Now, what I want to do is to trace the caching and the around ...

7. Advice when a method is called from other module    stackoverflow.com

I have three different maven modules:

  • security-api that contains an annotation and an Aspect.
  • module that is compiled with oven classes from "security-api".
  • client that calls through an API an annotated method from "module".
Everything ...

8. Multiple arguments with around advice    stackoverflow.com

I am given a method in a class like this..

public int foo(String a,String b){}
Now I want to apply a pointcut at this point and using around advice I want to alter ...

9. AspectJ 'around' advice - do you have to call 'proceed'?    stackoverflow.com

Here's an easy one, surely someone knows this off the top of their head...

Question

When you write 'around' advice in AspectJ, do you have to call proceed? Lets say you wanted ...





10. AspectJ - why "advice defined in XYZ has not been applied"?    stackoverflow.com

I just started playing with AspectJ (1.6.11). I'm sending emails via commons-email libary and I'd like to know how long it takes to send a message. So this is my email ...

11. Advice around method implementing an extended interface    stackoverflow.com

I am trying to do an advice around a method that extends an interface that looks like this:

public interface StructureService {
    void delete(FileEntry entry);
}

public interface FileService extends StructureService ...