1. If the type parameters are unrestricted, replace all type parameters in the generic type with their bounds or objects.
Therefore, the generated bytecode only includes ordinary classes, interfaces and methods.
2. Insert type conversions when necessary to maintain type safety.
3. In order to maintain polymorphism in extended generic types, generate bridge methods.
Example
List<String> list1 = new ArrayList<String>(); List<Integer> list2 = new ArrayList<Integer>(); System.out.println(list1.getClass() == list2.getClass()); // print true
The above is the application of java type erasure, I hope it will be helpful to everyone.