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 Interface Field
Date Thu, 26 Feb 2009 15:05:50 GMT
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?

3) isContentType(), isSubject(), isFrom() and isTo()

Feels arbitrary and incomplete.. remove?


PS: We can address some or all of these issues in 0.7 of course..

View raw message