Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: API For Analyzing Javadoc

  1. #1
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default API For Analyzing Javadoc

    I've been tasked with checking over our product's javadocs. The product contains...I don't know how many hundred source files (thankfully, don't have to check them all). I've began to notice a trend of similar small mistakes which I expect will be repeated throughout the entire product. So, in the spirit of developer's natural instinct to be efficiently lazy, I've started to wonder if there is an API out there which will allow me to run a quick check for common mistakes in our javadocs across the entire product.

    Does anyone know if there is an API out there which can analyze javadocs? Ideally, I'd like to be able to write a quick and dirty program to recurse through the project structures and generate a small report on common mistakes in the javadocs (inconsistent phrasing, common capitalization issues, ect.). I can think of a couple ways of accomplishing this if I had an API which gave me access to a class's javadocs. Any suggestions are appreciated.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  2. The Following User Says Thank You to aussiemcgr For This Useful Post:

    GregBrannon (February 7th, 2014)


  3. #2
    Member andbin's Avatar
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    443
    Thanks
    4
    Thanked 122 Times in 114 Posts

    Default Re: API For Analyzing Javadoc

    Quote Originally Posted by aussiemcgr View Post
    Does anyone know if there is an API out there which can analyze javadocs?
    There is the Doclet API, see here Javadoc Technology

    A "doclet" receives a (big) set of informations extracted from sources by the javadoc tool and generates all the output files for the javadoc documentation.
    Andrea, www.andbin.netSCJP 5 (91%) – SCWCD 5 (94%)

    Useful links for Java beginnersMy new project Java Examples on Google Code

  4. #3
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: API For Analyzing Javadoc

    I'm confused by the Doclet API. It seems to just be all interfaces, and all the examples seem to be about creating the javadoc pages, instead of reading information stored in the javadoc comments. Would I have to implement the entire package to create something functional?
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  5. #4
    Member andbin's Avatar
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    443
    Thanks
    4
    Thanked 122 Times in 114 Posts

    Default Re: API For Analyzing Javadoc

    Quote Originally Posted by aussiemcgr View Post
    I'm confused by the Doclet API. It seems to just be all interfaces, and all the examples seem to be about creating the javadoc pages, instead of reading information stored in the javadoc comments. Would I have to implement the entire package to create something functional?
    The Javadoc tool parses source files and "pass" objects and informations to a doclet. The standard doclet generates a mix of HTML/CSS and the output is what all us can see at Java Platform SE 7 (in Java 7 the standard doclet was changed to improve substantially the "look-and-feel" of javadoc).

    I think nobody prohibits to create a doclet just to print/generate some simple summaries or even do tests/validations on the javadoc comments. However I never heard about similar cases.
    Andrea, www.andbin.netSCJP 5 (91%) – SCWCD 5 (94%)

    Useful links for Java beginnersMy new project Java Examples on Google Code

  6. #5
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: API For Analyzing Javadoc

    Wait, so is the com.sun.javadoc package not in the standard JRE? Because Eclipse can't seem to find it.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  7. #6
    Member andbin's Avatar
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    443
    Thanks
    4
    Thanked 122 Times in 114 Posts

    Default Re: API For Analyzing Javadoc

    Quote Originally Posted by aussiemcgr View Post
    Wait, so is the com.sun.javadoc package not in the standard JRE? Because Eclipse can't seem to find it.
    From Doclet Overview

    "The doclet API class files are in the lib/tools.jar file in the SDK. When you compile a doclet, the tools.jar must be on the class path."
    Andrea, www.andbin.netSCJP 5 (91%) – SCWCD 5 (94%)

    Useful links for Java beginnersMy new project Java Examples on Google Code

Similar Threads

  1. Analyzing Input Files, Code Runs Forever
    By jwr in forum What's Wrong With My Code?
    Replies: 6
    Last Post: November 23rd, 2013, 05:24 PM
  2. Eclipse plugin - Analyzing a package
    By dunnkers in forum Java Theory & Questions
    Replies: 0
    Last Post: March 12th, 2011, 05:27 PM
  3. Need help in analyzing this word problem.
    By daveewhit in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 29th, 2010, 08:36 AM
  4. How do you generate javadoc?
    By javapenguin in forum Java IDEs
    Replies: 15
    Last Post: November 27th, 2010, 09:12 PM
  5. Difference between Speech API and Sound API
    By zeeshanmirza in forum Java SE APIs
    Replies: 1
    Last Post: October 22nd, 2009, 12:22 AM