Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AspectJ problem with subtype-superType

 
Kartik Patel
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have classes,
class Foo{
public void A(int c,int d) throws Exception
{
}
}

class Bar extends Foo{
public static void main(String args[])
{
Bar b=new Bar();
b.A(10,10);
}
}

I want to put before pointcut on method A. I am using loadtime weaving so binding to perticular class happens from aop.xml

my pointcut is defined something like this
public abstract aspect point();
before(Bar bar,int i1,int i2):execution(public void A(int c,int d) throws Exception) && this(bar) {
//Do something
}

aop.xml looks like
<pointcut name="point"
expression="within(Bar)"/>
</concrete-aspect>

Somehow its not working.. Can anyone please help ? Its real urgent.
 
Kartik Patel
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone Please???
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Patience Is A Virtue. Surely you can't expect a board of volunteers to reply to each and every post in an hour?

That said, AspectJ is not as widely used as something like Swing, and therefore people with knowledge about it are a bit harder to find. My own experience has lasted about a month back in 2003.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Move to Application Frameworks, hopefully a Spring experienced person can assist (Spring has Aspect J all over it )
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic