Interface to be implemented:
public interface Message {
}
public interface Handles<T extends Message> {
void hanlde(T message);
}
Concrete implementation:
public class EnforcementHandler<T extends Handles<T extends Message>> {
}
Unexpected bound
Is this pattern possible in Java?
You must write it as EnforcementHandler<M extends Message, T extends Handles<M>>
.