mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:39:36 +07:00
29 lines
479 B
Java
29 lines
479 B
Java
class Test {
|
|
final Extracted extracted = new Extracted(this);
|
|
|
|
void bar(){
|
|
System.out.println(extracted.getMyT());
|
|
}
|
|
|
|
String foo() {
|
|
return "";
|
|
}
|
|
|
|
void bazz() {
|
|
bar();
|
|
}
|
|
|
|
public static class Extracted {
|
|
private final Test test;
|
|
String myT;
|
|
|
|
public String getMyT() {
|
|
return myT;
|
|
}
|
|
|
|
public Extracted(Test test) {
|
|
this.test = test;
|
|
this.myT = test.foo();
|
|
}
|
|
}
|
|
} |