コード例 #1
0
  @Override
  public void visitMethodDef(JCMethodDecl tree) {
    super.visitMethodDef(tree);
    MethodSymbol meth = tree.sym;
    if (meth == null || meth.kind != Kinds.MTH) return;
    TreePath treePath = docenv.getTreePath(env.toplevel, env.enclClass, tree);
    if (meth.isConstructor()) docenv.makeConstructorDoc(meth, treePath);
    else if (isAnnotationTypeElement(meth)) docenv.makeAnnotationTypeElementDoc(meth, treePath);
    else docenv.makeMethodDoc(meth, treePath);

    // release resources
    tree.body = null;
  }
コード例 #2
0
 public void visitMethodDef(JCMethodDecl node) {
   node.sym = null;
   super.visitMethodDef(node);
 }