I have been using this more frequently now in Java but I don't know what it is called. Essentially there is a function which takes a type as a param and within the function there are overridden functions/methods that can be used. These functions can be executed within functions that are exposed by the main class. For example:
public class Whatisthis {
private OtherLibsomeCallback theCallback;
public void dothatthang{
//What do you call this kind of code structure?
someCallback(window, theCallback = new OtherLibsomeCallback() {
@Override
public void invoke(long a, double b) {
// TODO Auto-generated method stub
globalVar = a + b;
}
});
}
}