Hubert Rabago wrote:
I'm not sure I want to forbid config subclasses from accessing
their properties directly. I've come across several libraries
and frameworks which used "private" all throughout and made it
difficult if not impossible for me to customize certain behavior.
(I'm still running into those issues with the app I inherited
here in my day job.)
The 'properties' field was initially declared as protected when
it was only in ActionConfig. The goal was to reduce the likelihood
that subclasses would be needed. Now that it's in a class that's
intended to be subclassed, I wonder why it became private. Joe?
there is a getProperties() method which retrieves the "properties" object
my intention here was to have _all_ the accessor methods of "properties"
in BaseConfig - i guess it can be a hinderance when the classes a
changing rapidly as u've mentioned. i think of it as a 'cleaner' way :)
classes, only ActionConfig uses "properties" and needs to change for
this - not much.
We also need it in FormBeanConfig.
:)
BaseConfig already has an "inheritProperties(BaseConfig)" method, doing just
what you've outlined. This is used by subclasses when extending another
config object, not to be confused with the need to "copy" another config
object, which is when ActionConfig and FormBeanConfig needs access to the
properties field.
yes, very recently added :). again, what am trying to say is that
instead of moving the "properties" object (using getProperties()) the
properties can be inherited without retrieving the whole "properties"
object.
eg: pass the childConfig to the ParentConfig instead of the passing the
parentConfig (baseConfig) to the childConfig.
again, extending classes would have limited access to the properties object.
it comes down to the first point u made. :) ie:
> I'm not sure I want to forbid config subclasses from accessing
> their properties directly. I've come across several libraries
> and frameworks which used "private" all throughout and made it
> difficult if not impossible for me to customize certain behavior.
different ways of thinking ;)
riyaz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]