A specialized implementation of
DefaultParametersHandler that copies
the properties of a
BuilderParameters object (passed at construction
time) onto the object to be initialized.
Using this handler implementation makes specifying default values pretty
straight-forward: Just create a corresponding parameters object, initialize
it as desired, and pass it to this class. When invoked the handler uses
functionality from Commons BeanUtils to copy all properties defined
in the associated parameters object onto the target object. This is based on
reflection. Properties not available for the target object are silently
ignored. If an exception occurs during the copy operation, it is re-thrown as
a runtime exception.
Note that there is no default way to create a defensive copy of the passed in
parameters object; therefore, the reference is stored. This makes it possible
to change the parameters object later on, and the changes will be effective
when initializing objects afterwards. Client code should not rely on this
feature.