Search code examples
javaeclipsejavadoc

Javadoc link to class in default package?


Small preface: This is an assignment for my university that the grader has specified to NOT use package statements. I am personally working on improving my commenting skills so my code could potentially be used by others for group projects and the like.

Is there a way that I could use the link tag to link to another class/method within the default package?

Example:

/**
*
* @return A call to {@link ClassInDefaultPackage.methodA}
*
*/

Again, I cannot declare packages, so the default package MUST be used.

Best Regards!

EDIT: I believe it likely this cannot be achieved. A simple confirmation of impossibility would be very much a desirable answer.


Solution

  • Classes in the default package cannot be imported by classes in packages. This is why you should not use the default package.

    But if all your classes are inside default package @link should work --> /** * * @return A call to {@link ClassInDefaultPackage#methodA} * */