I have the following code:
public class SomeClass {
//InterfaceUpdateListener is an interface
private InterfaceUpdateListener listener = new InterfaceUpdateListener(){
public void onUpdate() {
SomeClass.this.someMethod(); //complier complains on this line of code
}
};
private void someMethod() {
//do something in here on an update event occuring
}
//other code to register the listener with another class...
}
My compiler in Eclipse complains that
Access to enclosing method 'someMethod' from type SomeClass is emulated by a synthetic accessor method.
Can anyone explain exactly
- what this means,
- what the possible ramifications might mean if I leave it as is (since its only a warning), and
- how I might fix it?
Thanks