Java 类com.intellij.psi.PsiArrayInitializerMemberValue 实例源码

项目:consulo-java    文件:PsiAnnotationPattern.java   
public PsiAnnotationPattern insideAnnotationAttribute(@NotNull final String attributeName, @NotNull final ElementPattern<PsiAnnotation> parentAnnoPattern)
{
    return with(new PatternCondition<PsiAnnotation>("insideAnnotationAttribute")
    {
        final PsiNameValuePairPattern attrPattern = PsiJavaPatterns.psiNameValuePair().withName(attributeName).withSuperParent(2, parentAnnoPattern);

        @Override
        public boolean accepts(@NotNull PsiAnnotation annotation, ProcessingContext context)
        {
            PsiElement attr = getParent(annotation);
            if(attr instanceof PsiArrayInitializerMemberValue)
            {
                attr = getParent(attr);
            }
            return attrPattern.accepts(attr);
        }
    });
}
项目:Android_Lint_SRP_Practice_Example    文件:PsiClassStructureDetector.java   
@Override
public void visitAnnotationArrayInitializer(PsiArrayInitializerMemberValue initializer) {
    mVisitor.report("PsiArrayInitializerMemberValue", initializer.getText(), initializer);
    super.visitElement(initializer);
}