james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Wiederkehr <markus.wiederk...@gmail.com>
Subject Re: Interface Field
Date Fri, 27 Feb 2009 17:14:24 GMT
On Fri, Feb 27, 2009 at 3:39 PM, Robert Burrell Donkin
<robertburrelldonkin@gmail.com> wrote:
> On Thu, Feb 26, 2009 at 7:58 PM, Oleg Kalnichevski <olegk@apache.org> wrote:
>> Markus Wiederkehr wrote:
>>>
>>> The newly introduced interface mime4j.parser.Field misses some of the
>>> method that where previously available in class mime4j.class.Field.
>>>
>>> The methods are still there but the user has to cast to AbstractField
>>> (with instanceof check of course) to gain access to them..
>>>
>>> Now the question is should we pull up some of the methods, remove them
>>> or move them to other places?
>>>
>>> IMO there are three categories of methods:
>>>
>>> 1) the static methods parse(ByteSequence), parse(String) and getParser()
>>>
>>> These are still accessible but Field.parse() felt natural whereas
>>> AbstractField.parse() feels clumsy in my opinon.. I would prefer a
>>> separate class for these.
>
> +1

I'll look into it tomorrow. The rest is done..

Markus

>
>>> 2) isValidField(), getParseException()
>>>
>>> Pull up?
>>>
>>
>> I personally would rather keep Field interface as generic ad simple as
>> possible. I agree static parsing methods should go to a separate class.
>> isValidField(), getParseException() do not belong to Field, in my opinion.
>
> IMHO they don't really seem to belong in AbstractField either. perhaps
> a subinterface or empty abstract class (ParsedField?) would be better.
>
>>> 3) isContentType(), isSubject(), isFrom() and isTo()
>>>
>>> Feels arbitrary and incomplete.. remove?
>>>
>>
>> +1 to remove.
>
> +1
>
> - robert
>

Mime
View raw message