import org.jetbrains.annotations.Contract; class Zoo { @Contract("null->null" ) Zoo(Object o) {} @Contract("_->fail" ) Zoo(int o) {} @Contract("true->fail" ) Zoo(boolean o) { if (o) throw new RuntimeException(); } }