Make array factors work with java types.