final String classPath,
final String destDir) {
if (sourcePath == null) throw new IllegalArgumentException("source path can not be null");
if (classPath == null) throw new IllegalArgumentException("class path can not be null");
final QDoxParser qdoxParser = new QDoxParser(sourcePath);
String[] classNames = qdoxParser.getAllClassNames();
for (int i = 0; i < classNames.length; i++) {
String className = classNames[i];
AttributeEnhancer enhancer = new BcelAttributeEnhancer(); // TODO: use factory
if (enhancer.initialize(className, classPath)) {
if (qdoxParser.parse(className)) {
JavaClass javaClass = parseClassAttributes(qdoxParser, enhancer);
parseFieldAttributes(javaClass, enhancer);
parseMethodAttributes(javaClass, enhancer);
parseInnerClassAttributes(javaClass, enhancer);
enhancer.write(destDir);