private void parse( String directory )
    {
        // Go through each directory and get the java source 
        // files for this dir.
        log.debug( "Scanning " + directory );
        DirectoryScanner directoryScanner = new DirectoryScanner();
        File baseDir = new File( directory );
        directoryScanner.setBasedir( baseDir );
        directoryScanner.setExcludes( excludes );
        directoryScanner.setIncludes( includes );
        directoryScanner.scan();
        String[] files = directoryScanner.getIncludedFiles();

        for ( int j = 0; j < files.length; ++j )
        {
            log.debug( "parsing... " + files[j] );

            //now parse out this file to get the packages/classname/etc
            try
            {
                String fileName = new File( baseDir, files[j] ).getAbsolutePath();
                JavaFile jfi = fileManager.getFile( fileName );

                // now that we have this parsed out blend its information
                // with the current package structure
                PackageType jp = this.getPackageType( jfi.getPackageType().getName() );

                if ( jp == null )
                {
                    this.addPackageType( jfi.getPackageType() );
                    jp = jfi.getPackageType();
                }

                // Add the current file's class(es) to this global package.
                if ( jfi.getClassTypes() != null && !jfi.getClassTypes().isEmpty() )
                {
                    for ( Iterator iterator = jfi.getClassTypes().iterator(); iterator.hasNext(); )
                    {
                        jp.addClassType( (ClassType) iterator.next() );
                    }
                }

            }
            catch ( IOException e )
            {
                e.printStackTrace();
            }

        }

    }