public Root parseRootDoc ( RootDoc rootDoc ) { Root rootNode = objectFactory . createRoot ( ) ; for ( ClassDoc classDoc : rootDoc . classes ( ) ) { PackageDoc packageDoc = classDoc . containingPackage ( ) ; Package packageNode = packages . get ( packageDoc . name ( ) ) ; if ( packageNode == null ) { packageNode = parsePackage ( packageDoc ) ; packages . put ( packageDoc . name ( ) , packageNode ) ; rootNode . getPackage ( ) . add ( packageNode ) ; } if ( classDoc instanceof AnnotationTypeDoc ) { packageNode . getAnnotation ( ) . add ( parseAnnotationTypeDoc ( ( AnnotationTypeDoc ) classDoc ) ) ; } else if ( classDoc . isEnum ( ) ) { packageNode . getEnum ( ) . add ( parseEnum ( classDoc ) ) ; } else if ( classDoc . isInterface ( ) ) { packageNode . getInterface ( ) . add ( parseInterface ( classDoc ) ) ; } else { packageNode . getClazz ( ) . add ( parseClass ( classDoc ) ) ; } } return rootNode ; }
The entry point into parsing the javadoc .