public JavacSourcePosition getSourcePosition(Element e, AnnotationMirror a) {
Pair<JCTree, JCCompilationUnit> treeTop = getTreeAndTopLevel(e);
if (treeTop == null)
return null;
JCTree tree = treeTop.fst;
JCCompilationUnit toplevel = treeTop.snd;
JavaFileObject sourcefile = toplevel.sourcefile;
if (sourcefile == null)
return null;
JCTree annoTree = matchAnnoToTree(a, e, tree);
if (annoTree == null)
return null;
return new JavacSourcePosition(sourcefile, annoTree.pos,
toplevel.lineMap);
}