forbid extending sort K in the Java backend