@NotNull public PsiQuery childrenNamed(@NotNull final Class<? extends PsiNamedElement> clazz,@NotNull final String name){
  final List<PsiElement> result=new ArrayList<PsiElement>();
  for (  final PsiElement element : myPsiElements) {
    for (    final PsiNamedElement child : PsiTreeUtil.findChildrenOfType(element,clazz)) {
      if (name.equals(child.getName())) {
        result.add(child);
      }
    }
  }
  return new PsiQuery(result.toArray(new PsiElement[result.size()]));
}

@ NotNull public PsiQuery childrenNamed ( @ NotNull final Class < ? extends PsiNamedElement > clazz , @ NotNull final String name ) { final List < PsiElement > result = new ArrayList < PsiElement > ( ) ; for ( final PsiElement element : myPsiElements ) { for ( final PsiNamedElement child : PsiTreeUtil . findChildrenOfType ( element , clazz ) ) { if ( name . equals ( child . getName ( ) ) ) { result . add ( child ) ; } } } return new PsiQuery ( result . toArray ( new PsiElement [ result . size ( ) ] ) ) ; }
filter children by name and class
