The Type
class stores array information
in it. If the array is multidimensional, the dimension depth can be accessed.
The JavaClass
method is used to
represent both classes and interfaces.
The isInterface()
method allows you to distinguish between the two.
When using a class, the getSuperClass()
return which class is extended. If this has not been defined in the input source code, java.lang.Object
is
returned. When using an interface, this method ALWAYS returns null.
When using a class, the getImplements() returns an array of the interfaces implemented by the class. If none are implemented, an empty array is returned. When using an interface, this returns an array of interfaces the current interface EXTENDS.
I some cases QDox is used to generate classes for another project with it's own dependencies. This could result in class-collission.
By default the JavadocBuilder will contain the classloader(s) of the current project, but by defining your own classLibrary you can have the required control.
/* new ClassLibrary() will give you an empty classLoader
* Big chance you want at least the system classloader.
*/
ClassLibrary classLibrary = new ClassLibrary( ClassLoader.getSystemClassLoader() );
JavaDocBuilder builder = new JavaDocBuilder(classLibrary);