What you are refering to are anonymous classes. Without seeing your code it is difficult to say why they are being created. I also assume you are using Eclipse. I am unfamiliar with how Eclipse handles specific cases so someone else may have a better answere. Where I have seen anonymous classes created are situations like:
Code:
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
// some code
}
});
Will create an anonymous Runnable class.