Get the type of the generic interface in Java after serialization-Collection of common programming errors

I was tinkering around with some Java code, and I found a piece of code, that I wrote some years ago for pre-generic-type Java.

Basicly it is a set of interfaces, where the base interface is something like that:

public interface RandomInterface
{
  void setter(Object o);
  Object getter();
}

And there are several other interfaces, extending this interface, and assigning specific type to the parameter and return type:

public interface AnotherRandomInterface extends RandomInterface
{
  void setter(String s);
  String getter();
}

I was wondering if I could use one interface instead of the “design hell” described above, in the following fashion:

public interface GenericInterface
{
  void setter(T o);
  T getter();
}

This is valid and legal in Java, but the object(s) implementing this interface are getting serialized and sent to another java application over the network.

The problem is, that the application receiving the object has “no clue” about the type of the object’s payload, because it was defined as generic in the interface. Is there any way to extract this information after deserialization? If not, is there any way to store it in the object itself before serialization – then retrieving it with a method defined in another interface?