No.
General annotations occur only at compile time, they are erased from the runtime. When the program is executed, ArrayList does not know about its generic type.
Thus, type annotation is applicable only to the compiler. If you do not know the type at compile time (program development time), you will not be able to use them.
source share