I like all those suggestions a lot. Your use cases are very convincing
(probably b/c they're from a real live app!)
What do you think of the ConversionFactory.getMatchPercent method? This
seems inappropriate for an interface to me. This seems like it belongs in
an implementation of
LA 1) The actual conversion logic should be implemented in small chunks,
LA inside the most primitive, bare code-container, interface :
LA public interface Conversion {
LA public Object convert(Object value) throws Exception;
LA }
I agree that the interface should be small, but I am not
LA public interface Conversion {
LA public Object convert(Object value) throws Exception;
LA }
RB I am not too sure about the Exception. Throw-everything forces
RB the caller to Catch-everything. Maybe a more specific Exception,
RB like ConversionFailedException, is sufficient.
Stephen