I want to make method reference from documentation, but I know how to do this in this way {@link Main.MainInner.mainInnerMethod()}
, but in the documentation the user see Main.MainInner.mainInnerMethod()
- it's too long. What if I want the user(of the code) to see only mainInnerMethod()
?
I know I can do this {@link Main.MainInner.mainInnerMethod() mainInnerMethod()}
, but if I decide to rename mainInnerMethod
to someMethod
, then the the user will see mainInnerMethod()
in the documentation instead of someMethod()
, so is there a way to get the simple name of method and put it in the documentation, so if the method is renamed the documentation will be updated too?
I'm just interested, I don't really need this in practical situation.
If the javadoc is on another method of MainInner
, then you just specify the method name: {@link #mainInnerMethod()}
If the javadoc is elsewhere, you must give at least the class name. If the class is import
'ed, you don't have to qualify it: {@link MainInner#mainInnerMethod()}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.