Bug 245604 - [ajdoc] ajdoc does not generate documentation for Aspect without a specified visibility
Summary: [ajdoc] ajdoc does not generate documentation for Aspect without a specified ...
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: AJDoc (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-28 19:55 EDT by Arturo Salazar CLA
Modified: 2013-06-24 11:07 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arturo Salazar CLA 2008-08-28 19:55:42 EDT
Build ID: M20080221-1800

Steps To Reproduce:
1.create a Aspect:
    aspect A{}
2.call ajdoc with -protected or -public


More information:
Ajdoc seems to generate a java file for this aspect that is in the form.
    class A{}
When ajdoc calls javadoc with this file, nothing is generated because unspecified visibility defaults to package.
My understanding is that an Aspect can only have the modifiers public, abstract or final, therefore the documentation for this aspect should be generated.
If an aspect has an unspecified visibility should the signature generator append public to it?
Comment 1 Arturo Salazar CLA 2008-08-29 18:57:35 EDT
It seems that declares also don't show up if -protected or -public is set.  I looked at the accessibility for declares and it's set to package for all declares. The decorator checks for proper visibility when generating the declare summary and detail and skips over the declares because of this. 
I'm not sure how handle this one.
One way would be to set the accessibility to public for all declares.
Another is to set the accessibility to that of the class that is being declared on.
Comment 2 Andrew Clement CLA 2008-10-02 14:36:42 EDT
havent had time to think about this properly, scheduling for 1.6.3
Comment 3 Andrew Clement CLA 2008-12-02 19:15:38 EST
i still haven't decided what to do with this - how urgent is it for you?  My first thought is that I don't mind the signature generator prepending public for the aspect decl.  On the second issue, can the decorator not just be more aware of declare constructs and always include them?
Comment 4 Arturo Salazar CLA 2008-12-05 18:56:14 EST
(In reply to comment #3)
> i still haven't decided what to do with this - how urgent is it for you?  My
> first thought is that I don't mind the signature generator prepending public
> for the aspect decl.  On the second issue, can the decorator not just be more
> aware of declare constructs and always include them?
My original thoughts on appending the public tag was if there was ever a reason to have a aspect not be visible in the documentation.  I can't really find a case in which an aspect would have such a visibility so I'll go ahead and append public to the code if it doesn't exist.

On the second issue my confusion was what to do when a class has a visibility of package. Should the aspect show in it's summary that it declares on a package class. An example of this is if a public class A extends a package class B.  When javadoc -public is run on these files the generated html doesn't show that A extends B. 
If I then use an aspect to make A extend B and I went ahead and included all the declare summaries then I would be revealing that A extends B in the Aspect documentation.  This seems to have the opposite behavior of javadoc.
Comment 5 Andrew Clement CLA 2013-06-24 11:07:20 EDT
unsetting the target field which is currently set for something already released