Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Is there any performance issue using thisJoinPoint

Hi Andy,

thx for answer. I found it also in AspectJ in Action book.

Is there any possiblity to delay the reflection. I'm not shure about the
possibility to use if(). The aspects will be per-type and the decision data
will be associated with the aspect instance.

So another question: Is it impossible to add a new feature someting like
thisLazyJoinPoint which uses the a closure functionality to delay the
creation of the actually (dynamic) join point.

Suggestion/Feature request:

Object arount() : pc() {
    if( .... ) {
      JointPoint jp=thisLazyJoinPoint.bind();
    }
}

---
public interface LazyJoinPoint {
      JoinPoint bind();
}
---

// the generated code code could be look like this.
final Object __this=this;
final Object __target=...;
// other objects which are necessary for creating thisJoinPoint. But only
referencing ;-)
final LazyJoinPoint __lazyJoinPoint = new LazyJoinPoint() {
    public JoinPoint bind() {
         JoinPoint jp=...;
         // do the reflection stuff with __this and __target
        ...
         return jp;
    }
}

// calling the advice.


This would be an awful cool feature. I know this would create a lot of
additional classes, but in Groovy Closures are an ubiquitous used feature
and nobody complaining about to much classes.

So you could add this as a feature request if this is possible.

Thx and merry xmas :-)

Marko
-- 
View this message in context: http://aspectj.2085585.n4.nabble.com/Is-there-any-performance-issue-using-thisJoinPoint-tp3160915p3161860.html
Sent from the AspectJ - users mailing list archive at Nabble.com.


Back to the top