I have come across Java code in this form for the first time:
object.methodA(new ISomeName() { public void someMethod() { //some code } });
It's called an Anonymous Class (PDF link).