Maybe these factory methods are not needed, `compiler` and `prefix` could be constructor parameters (and constructors can still be private). I don't see anything else that can be improved. :(

These 5 factories don't add anything, and since they are private, I don't think they buy much in terms of encapsulation either.