I am trying to create javadoc for my client library. In MyOtherClass, I put the the below @see , and get warnings. MyOtherClass and MyClass both are in different packages, in the same project.
@see MyClass#Constructor(Type1 param1, Type2 param2)
warning - Tag @see: reference not found: MyClass#Constructor(Type1 param1, Type2 param2)
Then I tried
@see MyClass#MyClass(Type1 param1, Type2 param2)
warning - Tag @see: reference not found: MyClass#MyClass(Type1 param1, Type2 param2)
Also tried
@see #MyClass(Type1 param1, Type2 param2)
warning - Tag @see: reference not found: MyOtherClass#MyClass(Type1 param1, Type2 param2)
I know I am missing something real silly here.
This is because the Javadoc needs to know the exact location of the class you are referencing to create a link to it. Simply add the package as was mentioned in a comment above.
@see mypackage.MyClass#Constructor(Type1 p1, Type2 p2)
The javadoc tool will allow you to take shortcuts as follows:
// For methods in the same class:
@see #Constructor(Type1 p1, Type2 p2)
// For methods in the same package:
@see MyClass#Constructor(Type1 p1, Type2 p2)
If you have a long package name and want to hide it you can use a label:
@see mypackage.MyClass#Constructor(Type1 p1, Type2 p2) MyClass#Constructor(Type1 p1, Type2 p2)
The above will display:
See Also: MyClass.Constructor(Type1 p1, Type2 p2)
See the Oracle documentation here for more on @see
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With