boolean (@NotNull CompletionPhase phase, Class<? extends CompletionPhase> @NotNull ... possibilities) { for (Class<? extends CompletionPhase> possibility : possibilities) { if (possibility.isInstance(phase)) { return true; } } return false; }