Self (final int index, final String... fqns) { return with(new PatternCondition<T>("constructorParameter") { @Override public boolean accepts(@NotNull final T literal, final ProcessingContext context) { final PsiElement parent = literal.getParent(); if (parent instanceof PsiExpressionList) { final PsiExpressionList psiExpressionList = (PsiExpressionList)parent; final PsiExpression[] psiExpressions = psiExpressionList.getExpressions(); if (!(psiExpressions.length > index && psiExpressions[index] == literal)) return false; final PsiElement element = psiExpressionList.getParent(); if (element instanceof PsiNewExpression) { PsiJavaCodeReferenceElement reference = ((PsiNewExpression)element).getClassOrAnonymousClassReference(); if (reference != null) { String qualifiedName = reference.getQualifiedName(); return ArrayUtil.contains(qualifiedName, fqns); } } } return false; } }); }