void (@NotNull Object component, @Nullable RelativePoint relativePoint) { if (!myClass.isInstance(component)) { throw new IllegalStateException("Unexpected UI component appears: wanted " + myClass.getName() + "; got: " + component.getClass().getName() + " (" + component + ")"); } doIntercept(myClass.cast(component), relativePoint); }