In Scaladoc, how to bind a method to the same class?

What is the correct way to create a method reference in the same class? Scaladoc documentation has no examples of this.

Consider a class such as:

package controllers // import ... class AccountController extends Controller with Secured { def current = Authenticated() { request => // ... } /** * See [[current]] for an endpoint that... */ def findAll = Authenticated() { request => // ... } } 

IntelliJ IDEA displays "quick documentation", all of which appear as red:

  • [[current]]
  • [[#current]]
  • [[AccountController.current]]
  • [[AccountController#current]]
  • [[controllers.AccountController.current]]

enter image description here

This appears as blue:

 [[controllers.AccountController#current]] 

So, I suppose this is correct, but is there a simpler but more correct way?

+5
source share

Source: https://habr.com/ru/post/1239343/


All Articles