Last active
June 25, 2018 22:21
-
-
Save sohaibiftikhar/d2175af74030d34f36252079a7a10dd2 to your computer and use it in GitHub Desktop.
java mixins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A { | |
public int a() { | |
return 1; | |
} | |
} | |
class B1 extends A { | |
public int b() { | |
return a() + 1; | |
} | |
} | |
class B2 extends A { | |
public int b() { | |
return a() + 2; | |
} | |
} | |
interface C { | |
default int a() { | |
return 2; | |
} | |
} | |
class B1e extends B1 implements C { | |
public int a() { | |
return C.super.a(); | |
} | |
} | |
class B2e extends B2 implements C { | |
public int a() { | |
return C.super.a(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment