boolean (PsiClass aClass) { for (PsiMethod method : aClass.findMethodsByName("createUI", false)) { if (method.hasModifierProperty(PsiModifier.STATIC)) { final PsiParameter[] parameters = method.getParameterList().getParameters(); if (parameters.length == 1) { final PsiType type = parameters[0].getType(); final PsiClass typeClass = PsiTypesUtil.getPsiClass(type); return typeClass != null && "javax.swing.JComponent".equals(typeClass.getQualifiedName()); } } } return false; }