mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-19 17:29:34 +07:00
13 lines
397 B
Java
13 lines
397 B
Java
import org.jetbrains.annotations.Contract;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
class Foo {
|
|
@Contract("!null,true->!null")
|
|
String delegationToInstance(@NotNull Foo f, boolean createIfNeeded) { return f.getString(createIfNeeded); }
|
|
|
|
@Contract("true->!null")
|
|
String getString(boolean createIfNeeded) { return createIfNeeded ? "" : null; }
|
|
|
|
}
|