4 Replies Latest reply: Jul 21, 2009 12:16 PM by thomas.behr RSS

    @see  #function(Type[]) ~ Having issues getting it to work

    843810
      I have the following inside the doc of one of my member functions in a class:
      @see      #addPossibleStringValue(String)
      @see      #addPossibleStringValues(String[])
      and here is the declaration of those functions:
      public void addPossibleStringValues(String[] possibleStringValues)
          {...}
      
      
      public void addPossibleStringValue(String possibleStringValue)
          {...}
      and the javadoc tool is giving me the following warning:
      warning - Tag @see: can't find addPossibleStringValues(String[]) in packagename.ClassName
      I imagine I am doing something wrong with the:
      @see  #function(Type[])
      entry

      if you could inform me as to what exactly I am doing incorrectly, I would be much obliged.

      Thank you for your time,
      Brandon
        • 1. Re: @see  #function(Type[]) ~ Having issues getting it to work
          thomas.behr
          officialhopsof wrote:
          @see      #addPossibleStringValue(String)
          @see      #addPossibleStringValues(String[])
          Did you put those @see tags into Javadoc comments? I mean, in your source code, it looks like
          /**
           * @see #addPossibleStringValue(String)
           * @see #addPossibleStringValues(String[])
           */
          void foo() {}
          and not like
          @see #addPossibleStringValue(String)
          @see #addPossibleStringValues(String[])
          void foo() {}
          right?

          If the former is the case, please post a complete example class or interface that can be javadoced to reproduce the warning message. Additionally, please post which version of Javadoc (Java) you are using and which operating system you are on. Of course, the Javadoc options you are using would be interesting, too.

          Using the following test class, Javadoc 1.4.2 and 1.6.0 on Ubuntu 7.10 run without warnings for me.
          package test;
          
          public class Javadoc {
            /**
             * @see #addPossibleStringValue(String)
             * @see #addPossibleStringValues(String[])
             */
            public void foo() {
            }
          
            public void addPossibleStringValues(String[] possibleStringValues) {
            }
          
            public void addPossibleStringValue(String possibleStringValue) {
            }
          }
          • 2. Re: @see  #function(Type[]) ~ Having issues getting it to work
            843810
            No, my code looked like:
            /**
             * @see #addPossibleStringValue(String)
             * @see #addPossibleStringValues(String[])
             */
            void foo() {}
            Actually the problem was fairly simple, after looking at it the next day, I noticed that I had declared addPossibleStringValues(String[]) as
            addPossibleStringValues(String)
            which is why java doc was acting up. It is amazing what a fresh set of eyes can accomplish. Just in case you are still wondering, I am running Ubuntu 8.04 with Sun Java version 1.6.0_14. And my javadoc command is whatever the default in eclipse is, which I am unsure how to view that.

            Thank you for your time,
            Brandon Murphy
            • 3. Re: @see  #function(Type[]) ~ Having issues getting it to work
              843810
              Oh, and I don't know how I managed to get the right declaration of the functions in my first post, I thought I had simply copied and pasted them. I am sorry about that. You would not have been able to fix the issue.
              • 4. Re: @see  #function(Type[]) ~ Having issues getting it to work
                thomas.behr
                officialhopsof wrote:
                It is amazing what a fresh set of eyes can accomplish.
                Yeah, I know that all too well. ;-)
                Glad you got it to work.

                Happy documenting.