mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
25 lines
512 B
Java
25 lines
512 B
Java
public class VisibilityPinline {
|
|
private static DifferentScope cashedObject = new DifferentScope();
|
|
|
|
private static DifferentScope provideObject() {
|
|
return new DifferentScope();
|
|
}
|
|
|
|
public void context() {
|
|
DifferentScope vB = new DifferentScope();
|
|
vB.inlineB(provideObject());
|
|
}
|
|
}
|
|
|
|
class DifferentScope {
|
|
private int value = 1;
|
|
|
|
public void mutate() {
|
|
value++;
|
|
}
|
|
|
|
public void inlineB(DifferentScope <caret>subj) {
|
|
subj.mutate();
|
|
}
|
|
}
|