pointcuts

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

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 collection itself, invocations of Set.contains(Object) or Set.size() return wrong results. Therefore I want to intercept all method ...

Is there a way to improve this pointcut?

I have come up with the following pointcut that I use for tracing method entry/exit. It's not broken and also does what I want but: 1- I find it looks clumsy or could be more elegant; and 2- I don't know if it is bulletproof. // tracing the execution of all methods except: // - toString and descendants // - methods identified with @NotT...

Please suggest some tutorial for learning pointcut expression

Please suggest some tutorial/cheatsheet for learning pointcut expression. ...

Trying to match an AspectJ pointcut signature for any methods containing a variable

I want to create a pointcut that matches any method in my Web controller that contains a ModelMap: pointcut addMenu(ModelMap modelMap) : execution (public String example.web.MyController.*(..)) && args (modelMap); before(ModelMap modelMap) : addMenu(modelMap) { // Do stuff with modelMap... } My problem is that this only matc...

Spring.Net public property setter pointcut

Hi, Do you know any pointcut definition in spring.net to intercept only public property setter (standard properties and auto-implement properties)? Is there a way after this to remove some property by name (Id, Version...)? Is it possible possible to narrow pointcut to children of a certain base class (EntityBase)? As you can see i'm...

Spring aop pointcut expression to access method return type

I have a service interface with many methods, all of which take a Request object and return a Response object. All request objects have a common ancestor and all response objects have a different common ancestor (which has a success flag and a message field). Now I want to have an around aspect that checks permissions etc, performs the ...

AspectJ, general pointcuts without constructors

Hi guys, I've made a profiling method: @Around("tld.mycompany.business.aspects.SystemArchitecture.inServiceLayer() && !tld.mycompany.business.aspects.SystemArchitecture.publicConstructor()") public Object profileBusiness(ProceedingJoinPoint pjp) throws Throwable { try { long start = System.currentTimeMillis(); String name = pj...

AspectJ: How to get pointcuts to advise classes located in other projects

This should be simple. Question How do you get a pointcut in one project to advise the code/classes within another project? Context I'm working in eclipse with two projects. For ease of explanation, let's call one science project and the other math project and say the science project relies on the math project and I'm developing in bo...

AspectJ confusion with pointcut

How can I express a point cut that finds methods only when being called from within another method, but not directly? For example: Foo() calls Bar() calls object.Method() also NotFoo() calls Bar() calls object.Method() I only want the pointcut to work for within Foo() I tried "withincode," but that seems to only work directly. Tha...