Site icon Java, SQL and jOOQ.

Syntax for calling “super” in Java 8 Defender methods

This is a very interesting discussion. How to reference default methods from implemented interfaces throughout the class / interface hierarchy? Situation:

interface K {
  int m() default { return 88; }
}

interface J extends K {
  int m() default { return K.super.m(); }
                        // ^^^^^^^^^^^^ How to express this?
}

Solution ideas: Any other crazy ideas? See the discussion here: http://mail.openjdk.java.net/pipermail/lambda-dev/2012-August/005616.html
Exit mobile version