I\'m not sure what the technical term for this is, but consider an interface:
public interface SomeInterface { public T doSomething(); }
See if this suit your need:
public interface SomeRelatedInterface { public > T doSomethingRelated(D relative); }