You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by Markus Wiederkehr <ma...@gmail.com> on 2009/02/01 21:16:33 UTC

Re: Field/FieldParser: hide implementation details

On Fri, Jan 30, 2009 at 4:06 PM, Markus Wiederkehr
<ma...@gmail.com> wrote:
> In package o.a.j.mime4j.field we have the FieldParser interface;
> DelegatingFieldParser, DefaultFieldParser and a lot of static inner
> class of the various Field classes implement this interface..
>
> Class Field has a getter to retrieve the DefaultFieldParser but there
> is no way to change that default value. So what's the point of this
> getter?

Okay, the original intention was probably to retrieve the
DefaultFieldParser from Field and then register additional parsers via
DelegatingFieldParser.setFieldParser(String name, FieldParser
parser)...

Still, the inner static Parser classes of MailboxField et al could
become package-private..

Markus

Re: Field/FieldParser: hide implementation details

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Feb 1, 2009 at 8:16 PM, Markus Wiederkehr
<ma...@gmail.com> wrote:
> On Fri, Jan 30, 2009 at 4:06 PM, Markus Wiederkehr
> <ma...@gmail.com> wrote:
>> In package o.a.j.mime4j.field we have the FieldParser interface;
>> DelegatingFieldParser, DefaultFieldParser and a lot of static inner
>> class of the various Field classes implement this interface..
>>
>> Class Field has a getter to retrieve the DefaultFieldParser but there
>> is no way to change that default value. So what's the point of this
>> getter?
>
> Okay, the original intention was probably to retrieve the
> DefaultFieldParser from Field and then register additional parsers via
> DelegatingFieldParser.setFieldParser(String name, FieldParser
> parser)...

AIUI yes

> Still, the inner static Parser classes of MailboxField et al could
> become package-private..

+1

- robert