Generics in Java work with type erasure, which means that the compiler will essentially remove the type parameters. At runtime, an ArrayList<String> looks like a plain old ArrayList to the JVM. There's no way of knowing that it it actually an ArrayList<String>, because the compiler has thrown the information about the String type parameter away.
The only thing you can do is guess, based on the elements. However, even if all elements are Strings, that does not mean it is an ArrayList<String> - it can also be an ArrayList<Object>, ArrayList<Serializable>, ArrayList<CharSequence> etc.