Correct way of anonymously subclassing TimerTask keeping a reference to 'this' inside the run method
<p>I subclassed <code>TimerTask</code> with an anonymous 'concrete' class, this way:</p>

<pre><code>public void setTimedTask() {
    /* Note: 'this' implements an interface called UpdateIndicatorsReceiver */
    final UpdateIndicatorsReceiver receiver = this;
    final TimerTask timerTask = new TimerTask() {
        @Override
        public void run() {
            /* The interface UpdateIndicatorsReceiver has an updateIndicators method */
            receiver.updateIndicators();
        }
    };
    /* Code to actually set the timer.... */
}
</code></pre>

<p>Please note the oddity of declaring a local <code>final</code> field named <code>receiver</code> and setting it to <code>this</code>. Is there any cleaner way of getting a non changing reference to <code>this</code>, in order to use it in the <code>run</code> method of the anonymous class?</p>
