guicamest/InterfaceToDTO — Issue #5: Add a method to use several interfaces in order to fill a DTO.
Author: guicamest
Created: 2011-10-13 02:31:23+00:00
State: open

The case:

public class User implements IFriendable {
....
IDrawable avatar;

// This one is a method of IFriendable
public IDrawable getAvatar();
....
}

With Circle and Square being instances of IDrawable.

If developer uses this method:
IFriendable friendable = InterfaceDTOUtils.getFilledDto(IFriendable.class, circle);

then the avatar would be set as a Circle or a Square, but not as an IDrawable.

The goal is bring a method like:
IFriendable friendable = InterfaceDTOUtils.getFilledDto(IFriendable.class, circle, IDrawable.class);

so that the avatar property is set as an IDrawableDTO