In case of not using the anonymous class way, what do you suggest?