[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Advising a constructor for a private inner class
|
I'm not 100% sure 'cause I never tried such thing in this particular
situation, but it seems like a 'privileged' aspect might be your friend.
Cos
On Tue, Feb 02, 2010 at 07:58AM, Norman Elton wrote:
> I've got the following class:
>
> public class ScheduledThreadPoolExecutor extends ThreadPoolExecutor
> implements ScheduledExecutorService {
> ...
> private class ScheduledFutureTask<V> extends FutureTask<V>
> implements RunnableScheduledFuture<V> {
> ScheduledFutureTask(Runnable r, V result, long ns) {
> super(r, result);
> }
> ...
> }
> }
>
> I would like to make an aspect to capture the Runnable argument ("r")
> passed to the constructor of the inner class, save it, then use it to
> override the ScheduleFutureTask's toString() method.
>
> I think I understand how to capture the argument (an inter-type
> declaration?), but how does one advise the constructor of a private
> inner class?
>
> Thanks for any advice (pun intended),
>
> Norman
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users