-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathInterfaceCombination.java
More file actions
49 lines (35 loc) · 1.08 KB
/
Copy pathInterfaceCombination.java
File metadata and controls
49 lines (35 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package org.python.tests;
public class InterfaceCombination {
public static final String NO_ARG_RESULT = "no_arg_result";
public static final String ONE_ARG_RESULT = "one_arg_result";
public static final String TWO_ARG_RESULT = "two_arg_result";
public interface IFace {
String getValue();
}
public interface IIFace {
String getValue(String name);
}
interface Hidden {
void internalMethod();
}
public static class Base {
public String getValue(String one, String two) {
return TWO_ARG_RESULT;
}
}
private static class Implementation extends Base implements IFace, IIFace, Hidden {
public String getValue(String one, String two, String three) {
return three;
}
public String getValue() {
return NO_ARG_RESULT;
}
public String getValue(String name) {
return ONE_ARG_RESULT;
}
public void internalMethod() {}
}
public static Object newImplementation() {
return new Implementation();
}
}