tags:

views:

84

answers:

1

Hi,

I am finding a way to write a script that I can generate javadoc for my program's Interfaces only (not for public classes). I have tried Eclipse built-in tool and even JAutodoc tool but have not been successful yet.

Does anyone have some ideas, please?

Thanks.

A: 

Personally, I would go with custom ant script (if you're familiar with it). With javadoc task you can use nested 'fileset' element with dynamically generated list of interfaces. Or just have script to copy all interfaces to temporary directory, run javadoc and remove temp dir in the end. Last can be implemented even with bash script.

But if you want user to not see your implementation classes, it makes more sense to limit their visibility. And then you can generate documentation only for public entries. Just a thought.

Nikita Rybak
I know how to generate javadoc using Ant task. However, I dont know how to check whether a file is an interface in Ant script. My program has hundreds of classes and interfaces and the difficulty is that interfaces are not located in separate folder themselves. I would have been easy for me if interfaces had been in separate folders. Do you know how to check a file as class or interface in Ant script? Thanks
ipkiss
The idea was to browse them in loop (ant-contrib lets you do that) looking for a pattern. Although, it seems to be easier with bash script and copy-interfaces-to-temp-folder idea.
Nikita Rybak