Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Advising a constructor for a private inner class

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


Back to the top