Results 1 to 6 of 6
  1. #1
    Malin is offline Member
    Join Date
    Mar 2017
    Posts
    1
    Rep Power
    0

    Default Generating javadoc

    Hi

    I am doing a project where i import other java classes and check their fields, constructors and methods for certain things. Once the program does the check I want it to automatically generate javadoc for the classes that I imported

    I am using eclipse

    Thanks

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,001
    Rep Power
    33

    Default Re: Generating javadoc

    Sounds like a useful program.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: Generating javadoc

    I can't see how this is going be anything other than a bandaid over code that hasn't got JavaDoc.
    It can't determine the most important part of a JavaDoc, which is a description of what the method (or class) does, what the parameters represent, and what it is supposed to return.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,989
    Rep Power
    8

    Default Re: Generating javadoc

    Good idea! Please generate the javadoc for this method:
    Java Code:
            public void combinatorics() {
                int[] a = {220, 130, 120, 100, 90, 90, 60};
                int[][] b = new int[200][8];
                int target = 300, tot = 0, c = 0, d = 0, temp;
                for (int i = 0; i < a.length - 1; ++i) {
                    ++c;
                    tot = tot + a[i];
                    if (tot <= target && tot >= target / 2) {
                        ++d;
                        System.out.print(c + ") " + d + ") " + a[i] + " = ");
                        System.out.print(tot);
                        System.out.println(" ");
                        b[d][0] = tot;
                        b[d][1] = a[i];
                    }
                    tot = 0;
                }
    
                for (int i = 0; i < a.length - 1; ++i)
                    for (int j = i + 1; j < a.length; ++j) {
                        ++c;
                        tot = tot + a[i] + a[j];
                        if (tot <= target && tot >= target / 2) {
                            ++d;
                            System.out.print(c + ") " + d + ") " + a[i] + " " + a[j] + " = ");
                            System.out.print(tot);
                            System.out.println(" ");
                            b[d][0] = tot;
                            b[d][1] = a[i];
                            b[d][2] = a[j];
                        }
                        tot = 0;
                    }
            }
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  5. #5
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Generating javadoc

    Or what specifically causes a given exception to be thrown. Perhaps it could be used to generate enhanced
    boiler plate in preparation to be edited.

    Regards,
    Jim
    Last edited by jim829; 03-22-2017 at 04:28 PM.
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: Generating javadoc

    But any IDE will do just that when you do /** ... there's not much else that I can think of that would be helpful.
    For example, for the following method:
    Java Code:
    public String doSomethingWithThis(int i, String foo, boolean bar) throws IOException
    When I type /** followed by a return in IntelliJ I get:
    Java Code:
        /**
         * 
         * @param i
         * @param foo
         * @param bar
         * @return
         * @throws IOException
         */
    which is about all that can be said about that method.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. I don't have javadoc
    By Krimi in forum New To Java
    Replies: 2
    Last Post: 05-11-2014, 05:58 AM
  2. Generating Javadoc Error
    By Zaroth in forum New To Java
    Replies: 1
    Last Post: 08-15-2010, 04:26 AM
  3. JavaDoc
    By javarishi in forum Eclipse
    Replies: 1
    Last Post: 04-10-2008, 08:41 AM
  4. Generating JavaDoc For a Project In NetBeans IDE
    By JavaForums in forum NetBeans
    Replies: 0
    Last Post: 08-02-2007, 12:11 PM
  5. Generating Javadoc In Eclipse IDE
    By JavaForums in forum Eclipse
    Replies: 0
    Last Post: 05-22-2007, 09:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •