They don't. They explicitly refuse to compile an app that takes advantage of things that can't statically be determined to be available at compile time. There are a few exceptions, but it is best not to rely on them.
That being said, generics and factory patterns aren't a problem for graal at all. Reflection and dynamic class loading are the biggest offenders.
Do you know about its workings?
Those are purely compile-time constructs.
Which means that the AOT generator has a finite set of classes to.comsider ?
And similarly, all the Spring/Boot dynamic features are a finite combination ?
(I have work on huge JVM systems with huge classpath directories but ultimately these run time polymorphism are finite?)