JavaDoc @see for MyClass constructor returns warning "link not found"

I am trying to create javadoc for my client library. In MyOtherClass, I put @see below and get warnings. MyOtherClass and MyClass 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 that I am missing something really stupid.

+5
source share
1 answer

This is because Javadoc needs to know the exact location of the class you are referencing in order to link to it. Just add the package as mentioned in the comment above.

@see mypackage.MyClass#Constructor(Type1 p1, Type2 p2)

The javadoc tool will allow you to use 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)

, :

@see mypackage.MyClass#Constructor(Type1 p1, Type2 p2) MyClass#Constructor(Type1 p1, Type2 p2)

:

. : MyClass.Constructor(Type1 p1, Type2 p2)

Oracle @see


:. IDE (, Eclipse) Javadoc, , . , , .
+4

All Articles