Frequently Asked Questions
- Where is the array information stored?
- What's the objecttype of an interface?
- Can I have full control over the classloader?
Where is the array information stored?
Type class stores array information
in it. If the array is multidimensional, the dimension depth can be accessed.
What's the object type of an interface?
When using a class, the getSuperClass()
return which class is extended. If this has not been defined in the input source code,
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.
Can I have full control over the classloader?
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);