The onPostAction method in Player itself is common. You have identified P there. Therefore, any method that overrides it should also be common.
Try
public class RPSHumanPlayer extends RPSPlayer { @Override public <P extends Player<RPSGesture, RPSResult>> void onPostAction(final P target, final RPSGesture gesture, final RPSResult result) { } }
A and R already defined by GesturePlayer as RPSGesture and RPSResult , but P still needs to be declared.
Adding
If it must be an exact signature, then you need to define P along with A and R in the Player interface:
public interface Player<A extends Action, R extends Result, P extends Player<A, R, P>> { default public void onPostAction(final P target, final A action, final R result) { } }
Then the GesturePlayer changes accordingly:
abstract public class GesturePlayer<A extends Action, R extends Result, P extends Player<A, R, P>> implements Player<A, R, P> { }
Then RPSPlayer defines itself as P
abstract public class RPSPlayer extends GesturePlayer<RPSGesture, RPSResult, RPSPlayer> { }
And RPSHumanPlayer can have the method as is:
public class RPSHumanPlayer extends RPSPlayer { @Override public void onPostAction(final RPSPlayer target, final RPSGesture gesture, final RPSResult result) { } }