如何分析javadoc? [英] How to parse a javadoc?

查看:192
本文介绍了如何分析javadoc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Java来读取javadoc。



我的java对象有属性
描述
包名称
方法名称,方法说明



是否有任何现有的api可以做到这一点?
如何读取javadoc,以便我可以提取上述属性?

解决方案

a href =http://download.oracle.com/javase/6/docs/technotes/guides/javadoc/index.html =noreferrer> javadoc 工具包含一个用于编写自定义doclet的API。这些基本上得到了文档碎片的解析树,并且基于此生成了一些类型的报告。标准doclet生成每个人都熟悉的HTML页面。你最简单的选择很可能是写你自己的文档。


I am in the process of using Java to read javadocs.

My java object has the attributes, Description Package Name Method Name, Method Description

Is there any existing api that can do this? How can I read the javadoc in such a way that I can extract the above mentioned attributes?

解决方案

The javadoc tool includes an API for writing custom doclets. These basically get the parsed tree of documentation fragments and they generate some kind of report based on that. The standard doclet generates the HTML pages everyone is familiar with. Your easiest option is likely to write your own doclet.

这篇关于如何分析javadoc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆