boolean (@NotNull UCallExpression call, @NotNull String colorClassName) { PsiMethod constructor = call.resolve(); if (constructor == null || !constructor.isConstructor()) return false; PsiClass constructorClass = constructor.getContainingClass(); if (constructorClass == null) return false; return colorClassName.equals(constructorClass.getQualifiedName()); }