Everything looks fine to me, shouldn't value.getClass() return variable of type Class<V>?
Yeah. You would think that it would be the case? But it's not.
The getClass() method is from the Object class. And the Object class is not a generic class. So, the getClass() method returns a Class object of an unknown type (? that extends Object, to be exact).
IMO, I think they purposely didn't make the Object support generics, and the reason is because it would be too annoying to fix everything -- since everything inherits from the Object class.
Henry