WIP: default method reloading
This commit is contained in:
10
testdata-java8/src/main/java/basic/DefaultMethodsC1A.java
Normal file
10
testdata-java8/src/main/java/basic/DefaultMethodsC1A.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package basic;
|
||||
|
||||
public class DefaultMethodsC1A implements DefaultMethodsI1A {
|
||||
|
||||
public static int run() {
|
||||
DefaultMethodsC1A instance = new DefaultMethodsC1A();
|
||||
instance.test();
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package basic;
|
||||
|
||||
public class DefaultMethodsC2A implements DefaultMethodsI2A {
|
||||
|
||||
public static int run() {
|
||||
DefaultMethodsC2A instance = new DefaultMethodsC2A();
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
10
testdata-java8/src/main/java/basic/DefaultMethodsC2A2.java
Normal file
10
testdata-java8/src/main/java/basic/DefaultMethodsC2A2.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package basic;
|
||||
|
||||
public class DefaultMethodsC2A2 implements DefaultMethodsI2A2 {
|
||||
|
||||
public static int run() {
|
||||
DefaultMethodsC2A2 instance = new DefaultMethodsC2A2();
|
||||
instance.test();
|
||||
return 43;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package basic;
|
||||
|
||||
public interface DefaultMethodsI1A {
|
||||
public default void test() {}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package basic;
|
||||
|
||||
public interface DefaultMethodsI1A2 {
|
||||
public default void test() {System.out.println("FOO");}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package basic;
|
||||
|
||||
public interface DefaultMethodsI2A {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package basic;
|
||||
|
||||
public interface DefaultMethodsI2A2 {
|
||||
public default void test() {
|
||||
System.out.println("FOO");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user