I constantly run into this problem:
class MyClass implements MyInterface {
private Runnable runnable = new Runnable() {
@Override
public void run() {
// SecondClass class = new SecondClass(this);
// I want to pass 'MyClass' as 'this' parameter.
// Is it possible to achieve somehow?
}
};
}
class SecondClass {
SecondClass(MyInterface interface) {
}
}
Is there a proper way to handle this?