Ok here's the scene ........ i've gotta function which i need to call whose signature goes like this
and is inside a class named AdvertisementFactory.
now ive got a class called CodatAdv which has got a public static Inner class named Instantiator which implements the original AdvertisementFactory.Instantiator and has all the methods of that particular interface(AdvertisementFactory.Instantiator)
But when i call the above static method with the following parameters
i get a classcastexception at runtime....... can someone out here tell me where i'm going wrong coz as far as i know a super-interface can always point to a sub-interface of the same class.