PsiMethodPattern (final ElementPattern<?> pattern) { return with(new PatternCondition<PsiMethod>("withThrowsList") { @Override public boolean accepts(@NotNull final PsiMethod method, final ProcessingContext context) { return pattern.accepts(method.getThrowsList()); } }); }