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.
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.
3) isContentType(), isSubject(), isFrom() and isTo()
Feels arbitrary and incomplete.. remove?
+1 to remove.
Oleg
Cheers,
Markus
PS: We can address some or all of these issues in 0.7 of course..