当您在 Eclipse 中使用任何类或函数时,会出现一个小对话框,显示有关您选择的类或函数的一些信息。
我的问题是:我怎样才能为我的类和函数做同样的事情?我无法找到有关如何执行此操作的任何信息。
示例:
对于类:ArrayList
:
允许所有元素,包括 null
。
This class is a good choice as your default List implementation. Vector synchronizes all operations, but not necessarily in a way that's meaningful to your application: synchronizing each call to get, for example, is not equivalent to synchronizing the list and iterating over it (which is probably what you intended). CopyOnWriteArrayList is intended for the special case of very high concurrency, frequent traversals, and very rare mutations.
Summary
对于函数:Log.d()
:
public static int d (String tag, String msg, Throwable tr) Since: API Level 1 Send a DEBUG log message and log the exception.
Parameters tag Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. msg The message you would like logged. tr An exception to log
最佳答案
如果您向类、方法和变量添加 Javadoc 注释,Eclipse 应该像内置类一样弹出本地帮助。您可以阅读有关如何编写 Javadoc 工具文档的信息 here .
关于java - 对于类 : Set Overview and Description to my classes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12764852/