I wrote a non-blocking MySQL interface for java (wrapped around the standard mysql java connector).
I think the code to use it looks a bit ugly however...
db.rawQuery(queries.someAlreadyPreparedStatement, (new Callback(){
public void result(ResultSet result){
while (result.next()) {
//Handle each row from the result and do any processing
}
}));
How could this be improved? Is this as good as it gets?