-
Notifications
You must be signed in to change notification settings - Fork 8
Constructors
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.
- Five Minute Introduction
- Getting Moo
- Translating Object Properties
- Translating Collection Properties
- Translating Map Properties
- Source Expressions
- Access Modes
- Translating to Value Types
- Extensions
- External Objects in Translation
- Ignoring Properties
- Updating Collections
- Translation Target Factories
- Nested Updates
- Optional and Required Properties
- Order of Property Translation
- Constructors
- Lookup on Update
- Caching
Releases
Background