How to reference a method in javadoc?

前端 未结 3 1306
忘掉有多难
忘掉有多难 2020-11-28 00:13

How can I use the @link tag to link to a method?

I want to change:

/**
 * Returns the Baz object owned by the Bar object owned by Foo ow         


        
3条回答
  •  一向
    一向 (楼主)
    2020-11-28 00:46

    you can use @see to do that:

    sample:

    interface View {
            /**
             * @return true: have read contact and call log permissions, else otherwise
             * @see #requestReadContactAndCallLogPermissions()
             */
            boolean haveReadContactAndCallLogPermissions();
    
            /**
             * if not have permissions, request to user for allow
             * @see #haveReadContactAndCallLogPermissions()
             */
            void requestReadContactAndCallLogPermissions();
        }
    

提交回复
热议问题