[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ews.eclipse.technology.aspectj] Re: Two implemententation. Are they supported?


H.Ceylan wrote:
Hello,

I asked these two questions in the ajdt newsgroup but they were ignored.

Maybe I should have asked them here.
I have two cases and not sure if these are supported by aspectJ...
If they are not, would they be considered to be of any value to implement?

1) Intercepting instances going out of scope.

2) Matching methods that have calls to a specific joinpoint

Let me a little elaborate:

I have specific joinpoint say Foo.bar();

In the entire VM, I would like to match the methods that has call to
Foo.bar();

Ex:

class OtherFoo {
	void bar(){
		dosomething();
		
		Foo foo = new Foo();
		foo.bar();
		
		doTheOtherThing();
	}
}


Now I would like to match the entire OtherFoo.bar() and wrap it up with an around advise... Such that advice executes the whole bar() rather then foo.bar() line only...

H.Ceylan

You are likely to get a much better response using the mailing lists rather than the newsgroups.


I don't think you can do what you want - you can match calls to foo.bar(), but you can't match executions of a method that makes calls to some method. Take a look at this enhancement in bugzilla - do you think it relates to what you are trying to achieve?

https://bugs.eclipse.org/bugs/show_bug.cgi?id=124175

Andy.