In this tutorial on reflection it states:
[...] because generics are implemented via type erasure which removes all information regarding generic typ
Some generics stay in the compiled class -- specifically including method signatures and class definitions, for example. At runtime, no objects keep their full generic type, but even at runtime you can look up the generic definition of a class or a method.
For example, if you have
class Foo {
List getList() { ... }
public static void main(String[] args) {
System.out.println(Foo.class.getMethod("getList").getGenericReturnType());
// prints "List"
List list = new Foo().getList();
// there is no way to get the "String" parameter on list
}