mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-23 18:03:06 +07:00
21 lines
593 B
Java
21 lines
593 B
Java
public class Usage {
|
|
public void parameterUsageMethod(DelegatedBase b) {
|
|
b.delegatedBaseMethod();
|
|
}
|
|
|
|
public int testMethod() {
|
|
A a = new A();
|
|
B b = new B();
|
|
parameterUsageMethod(a.getMyDelegate());
|
|
parameterUsageMethod(b.getMyDelegate());
|
|
a.getMyDelegate().delegatedBaseMethod();
|
|
b.getMyDelegate().delegatedBaseMethod();
|
|
a.equals(b);
|
|
return a.getMyDelegate().delegatedBaseField + b.getMyDelegate().delegatedBaseField;
|
|
}
|
|
|
|
DelegatedBase getDelegatedBase(A a) {
|
|
return a.getMyDelegate();
|
|
}
|
|
}
|