Javadoc用于匿名对象的方法 [英] Javadoc for method of anonymous object

查看:90
本文介绍了Javadoc用于匿名对象的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正确有用地记录匿名对象功能的最佳方法是什么?我正在使用Soar进行一些编程(API 此处),并且代码看起来像这样:

What is the best way to properly and usefully document a function of an anonymous object? I am doing some programming with Soar (API here), and have code that looks something like this:

/**
 * 
 * @return handler that does blah
 */
public static RhsFunctionInterface functionBlah() {
    return new Kernel.RhsFunctionInterface() {
        /**
         * Does blah
         */
        @Override
        public String rhsFunctionHandler(int eventID, Object data,
                String agentName, String functionName, String arguments) {
            return null;
        }
    };
}

当知道返回对象的功能是什么很重要时,它期望参数等,我不知道该写下什么。 Eclipse似乎忽略了javadoc的方法,我真的不想为每个处理程序编写单独的类,仅用于文档目的。

When it is important to know what the function of the returned object does, what it expects for parameters, etc., I'm not sure what to write down. Eclipse seems to ignore the javadoc's method, and I really don't want to write separate classes for each of the handlers just for documentation purposes.

推荐答案

该方法根本不需要任何文档,因为它是接口的实现,并且应该记录该接口。接口的实现行为符合。

The method should not need any documentation at all, as it's the implementation of an interface, and that interface should be documented. The implementation of an interface behaves according to that.

这篇关于Javadoc用于匿名对象的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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