Which is the best way to implement ButtonListeners in different classes?
<p>I know 3 ways to create a listener:</p>

<h3>1. Anonymous type</h3>

<pre><code> btn.addClickListener(new ButtonClickListener(){
   doSomething();
 })
</code></pre>

<h3>2. Class inner type</h3>

<pre><code>btn.addClickListener(new MyButtonClickListener());
public MyButtonClickListener implements ButtonClickListener{}
</code></pre>

<h3>3. External class</h3>

<p>So the same above but in another class.</p>

<h2>Problem</h2>

<p>If I have some fields in the class who use the button and I want to do something with buttons, which is the cleanest way?</p>

<p>For example, I have <code>String a = "foo"</code> as a field and when I click the button I want to change this field.</p>

<ul>
<li>Case 1: I can use <code>MyClass.this.foo = "bar";</code></li>
<li>Case 2: The same.</li>
<li>Case 3: ? (Create a custom constructor with reference to the field?)</li>
</ul>
