commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: [digester] why private XXXRule in DigesterRuleParser?
Date Tue, 21 Oct 2003 20:41:42 GMT
+1

i'd be happy to see the nested classed in the xmlrules made public if a 
need could be demonstrated.

- robert

On Monday, October 20, 2003, at 10:12 PM, Simon Kitching wrote:

> Hi Ricky,
>
> You must be referring to
>   xmlrules/DigesterRuleParser.java
>
> I'm no expert on the xmlrules package.
>
> However it is normal practice for classes created solely for the purpose
> of implementing function X to be declared private.
>
> The PatternRule class appears to have been created *not* with the
> intention of providing additional services to users of Digester, but
> solely as an implementation detail of the xmlrules functionality. As
> such, private seems the appropriate scope to me.
>
> If you feel that the functionality of the PatternRule is useful outside
> of the xmlrules package, then consideration could be given to
> "promoting" the class to public.
>
> Note however that any class or method declared public (or protected) is
> part of the "public interface" to a package, and must:
> (a) be documented much more thoroughly than private/package classes
> (b) be backwards-compatible in future releases
> (c) be deprecated before removal
>
> So a class really should only be public if it needs to be.
>
>
> Regards,
>
> Simon
>
> On Tue, 2003-10-21 at 10:02, Ricky Panaglucci wrote:
>> hello,
>> why do classes like PatternRule have private access?
>>
>> now, for adding my own rules which may use surrounding
>> "pattern", i just copied the PatternRule source [very
>> brown imho]
>>
>> why not make them protected or public?
>>
>>
>> ricardo
>>
>> ________________________________________________________________________
>> Want to chat instantly with your online friends?  Get the FREE Yahoo!
>> Messenger http://mail.messenger.yahoo.co.uk
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message