There's no generics syntax that would support it, unless the method takes a parameter with a type argument of the required type, which it doesn't in this case. This sort of thing would work:
<T> T readObject(T prototype)
but readObject() doesn't take any parameters so there is nowhere for the compiler to get T from.
And in this case it makes no sense as the objects are coming from a file, not from an internal data structure which can be typechecked.