mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 11:44:39 +07:00
adapted from https://github.com/JetBrains/intellij-community/pull/1090
23 lines
452 B
Java
23 lines
452 B
Java
@javax.annotation.concurrent.Immutable
|
|
interface Intf {
|
|
@org.jetbrains.annotations.Nullable String foo();
|
|
}
|
|
|
|
@com.google.auto.value.AutoValue
|
|
abstract class Value {
|
|
abstract @org.jetbrains.annotations.Nullable String foo();
|
|
}
|
|
|
|
class Usage {
|
|
void bar(Intf i) {
|
|
if (i.foo() != null) {
|
|
System.out.println(i.foo().length());
|
|
}
|
|
}
|
|
void bar(Value i) {
|
|
if (i.foo() != null) {
|
|
System.out.println(i.foo().length());
|
|
}
|
|
}
|
|
|
|
} |