code: private JCTree matchAnnoToTree(AnnotationMirror findme,
                                     Element e, JCTree tree) {
          Symbol sym = cast(Symbol.class, e);
          class Vis extends JCTree.Visitor {
              List<JCAnnotation> result = null;
              public void visitPackageDef(JCPackageDecl tree) {
                  result = tree.annotations;
              }
              public void visitClassDef(JCClassDecl tree) {
                  result = tree.mods.annotations;
              }
              public void visitMethodDef(JCMethodDecl tree) {
                  result = tree.mods.annotations;
              }
              public void visitVarDef(JCVariableDecl tree) {
                  result = tree.mods.annotations;
              }
              @Override
              public void visitTypeParameter(JCTypeParameter tree) {
                  result = tree.annotations;
              }
          }
          Vis vis = new Vis();
          tree.accept(vis);
          if (vis.result == null)
              return null;
  
          List<Attribute.Compound> annos = sym.getAnnotationMirrors();
          return matchAnnoToTree(cast(Attribute.Compound.class, findme),
                                 annos,
                                 vis.result);
      }
docs: Returns the tree for an annotation given the annotated element
  and the element's own tree.  Returns null if the tree cannot be found.