Here is a more specific example:
public class A {
public static class B {
public void f() {
synchronized (B.this) {
// do something
}
}
}
}
What does B.this refer to?
It's the active instance ofB. If the class weren't static, you'd also haveA.this` available, to refer to the containing instance of A.Because the class is static, it should never be necessary to use
B.this, as simplythiswould never be ambiguous.