PsiMethod (@NotNull PsiClass clazz) { for (PsiMethod each : clazz.getMethods()) { if (each.hasModifierProperty(PsiModifier.STATIC) && AnnotationUtil.isAnnotated(each, JUnitUtil.AFTER_ALL_ANNOTATION_NAME, 0)) return each; } return null; }