Campbell Ritchie wrote:You are probably too young to understand public class LSD extends Money.
Unfortunately (or should that be fortunately) not.
Matthew Brown wrote:In other words, would it be a problem to return legacy types as long as they were never referred to as that type?
An interesting point.
Any restrictions on what could be returned would have to be compiler and not runtime restrictions so you would have to allow legacy classes to be returned if referred to by an implemented interface.
Another issue is if a class is marked as Legacy what happens to any class that extends it.