Skip to content
Geoffrey Wiseman edited this page May 14, 2014 · 1 revision

Prior to Moo v1.3, all objects instantiated by Moo (typically a translation destination) had to be from classes with a public no-argument constructor. This kind of limitation is not entirely uncommon in Java frameworks, although it is a limitation. If you have classes for which you'd prefer a class invariant, a no-argument constructor can be an irritation.

While Moo may eventually support specifying constructor parameters, this is not yet possible.

In the meantime, however, Moo now will let you use classes with private or protected no-argument constructors as well; this allows you to write a constructor which will be used by Moo (and other frameworks that support private/protected no-argument constructors, like Hibernate) but which won't be part of the 'public API' that your class exposes.