Adding code for annoymous innerclass which extends an abstract class