public FluentIterable<PsiAnnotationMethod> getAttributeMethods() { return fluentIterable(element.getMethods()) .transform(new Function<PsiMethod, PsiAnnotationMethod>() { @Override public PsiAnnotationMethod apply(@Nullable PsiMethod psiMethod) { if ( psiMethod instanceof PsiAnnotationMethod ) { return (PsiAnnotationMethod)psiMethod; } else { return null; } } }) .filter(Predicates.notNull()); }
@Override public void visitAnnotationMethod(PsiAnnotationMethod method) { mVisitor.report("PsiAnnotationMethod", method.getText(), method); super.visitMethod(method); }