On Nov 28, 2007, at 1:31 PM, Jason Terhune wrote:
I haven't actually tried this, but couldn't you just overload the
toObject()
and toRepresentation() methods? Doesn't Java do the work of
choosing the
method with the most specific argument?
For example:
public class ConverterService extends ConverterService {
public Foo toObject(FooRepresentation fr);
public FooRepresentation toRepresentation(Foo f);
}
But the base class can't specify the infinite number of derived
classes as arguments to an infinite number of methods.
- Paul