Since Java is missing self types . (If they were with them, then the return type would be Class<? extends self_type>). Thus, the signature simply declares Class<?>, (the next one) the best thing it can do, which is less than ideal - the compiler certainly knows that it is getClass()not returning any class, and the class, which is a subtype of / strong> of the static type of the expression, is which is called getClass().
, , Class<?> - , Class<? extends TheClass>, , :)
PS: Class<? extends Object>, getClass() Object.