This feels like a dumb question and could even be a duplicate (I’ve looked, but can’t find it).
But how in the heck (if it is even possible) do I do this with type safety?
ArrayList<String> myList = applicationContext.getBean( ArrayList<String>.class );
Java implements generics via type erasure. Which means the generic type is available at compile time but is Object at runtime. So no, there’s no way to get that to work without casting.