Use a builder pattern. See latest PR by @olafleur in gwtp