On Thu, Feb 26, 2009 at 7:58 PM, Oleg Kalnichevski <[email protected]> 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 >> 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
