`
Gavin.Chen
  • 浏览: 325691 次
  • 性别: Icon_minigender_1
  • 来自: 广州
文章分类
社区版块
存档分类
最新评论

ProjectPackagesPrinter

阅读更多
import java.io.File;

/**  
 * @author Dao
 *   
 */
public class ProjectPackagesPrinter
{
  private static int packageNumber = 0;
  /**  
   * @param args  
   */
  public static void main(String[] args)
  {
    String packageBasePath = "G:\\spring\\spring-framework-2.5\\src\\main\\java\\org";
    
    File file = new File(packageBasePath);
    
    showPackage(file, "");
    
    System.out.println("Total package: " + packageNumber);
  }
  
  private static void showPackage(File file, String basePath)
  {
    if (file.isDirectory())
    {
      packageNumber++;
      
      String directoryName = file.getName();
      String packagePath = basePath + directoryName;
      
      System.out.println(packagePath);
      
      File[] subFiles = file.listFiles();
      
      for (File subFile : subFiles)
      {
        showPackage(subFile, packagePath + ".");
      }
    }
  }
}

 效果

org.springframework
org.springframework.aop
org.springframework.aop.aspectj
org.springframework.aop.aspectj.autoproxy
org.springframework.aop.config
org.springframework.aop.framework
org.springframework.aop.framework.adapter
org.springframework.aop.framework.autoproxy
org.springframework.aop.framework.autoproxy.target
org.springframework.aop.interceptor
org.springframework.aop.scope
org.springframework.aop.support
org.springframework.aop.target
org.springframework.aop.target.dynamic
org.springframework.beans
org.springframework.beans.factory
org.springframework.beans.factory.access
org.springframework.beans.factory.config
org.springframework.beans.factory.parsing
org.springframework.beans.factory.support
org.springframework.beans.factory.wiring
org.springframework.beans.factory.xml
org.springframework.beans.propertyeditors
org.springframework.beans.support
org.springframework.cache
org.springframework.cache.ehcache
org.springframework.context
org.springframework.context.access
org.springframework.context.config
org.springframework.context.event
org.springframework.context.i18n
org.springframework.context.support
org.springframework.core
org.springframework.core.enums
org.springframework.core.io
org.springframework.core.io.support
org.springframework.core.style
org.springframework.core.task
org.springframework.core.task.support
org.springframework.dao
org.springframework.dao.support
org.springframework.ejb
org.springframework.ejb.access
org.springframework.ejb.config
org.springframework.ejb.support
org.springframework.jca
org.springframework.jca.cci
org.springframework.jca.cci.connection
org.springframework.jca.cci.core
org.springframework.jca.cci.core.support
org.springframework.jca.cci.object
org.springframework.jca.context
org.springframework.jca.endpoint
org.springframework.jca.support
org.springframework.jca.work
org.springframework.jdbc
org.springframework.jdbc.core
org.springframework.jdbc.core.namedparam
org.springframework.jdbc.core.support
org.springframework.jdbc.datasource
org.springframework.jdbc.datasource.lookup
org.springframework.jdbc.object
org.springframework.jdbc.support
org.springframework.jdbc.support.incrementer
org.springframework.jdbc.support.lob
org.springframework.jdbc.support.nativejdbc
org.springframework.jdbc.support.rowset
org.springframework.jms
org.springframework.jms.config
org.springframework.jms.connection
org.springframework.jms.core
org.springframework.jms.core.support
org.springframework.jms.listener
org.springframework.jms.listener.adapter
org.springframework.jms.listener.endpoint
org.springframework.jms.listener.serversession
org.springframework.jms.remoting
org.springframework.jms.support
org.springframework.jms.support.converter
org.springframework.jms.support.destination
org.springframework.jmx
org.springframework.jmx.access
org.springframework.jmx.export
org.springframework.jmx.export.assembler
org.springframework.jmx.export.metadata
org.springframework.jmx.export.naming
org.springframework.jmx.export.notification
org.springframework.jmx.support
org.springframework.jndi
org.springframework.jndi.support
org.springframework.mail
org.springframework.mail.javamail
org.springframework.metadata
org.springframework.metadata.commons
org.springframework.orm
org.springframework.orm.hibernate3
org.springframework.orm.hibernate3.support
org.springframework.orm.ibatis
org.springframework.orm.ibatis.support
org.springframework.orm.jdo
org.springframework.orm.jdo.support
org.springframework.orm.toplink
org.springframework.orm.toplink.support
org.springframework.remoting
org.springframework.remoting.caucho
org.springframework.remoting.httpinvoker
org.springframework.remoting.jaxrpc
org.springframework.remoting.jaxrpc.support
org.springframework.remoting.rmi
org.springframework.remoting.soap
org.springframework.remoting.support
org.springframework.scheduling
org.springframework.scheduling.backportconcurrent
org.springframework.scheduling.commonj
org.springframework.scheduling.quartz
org.springframework.scheduling.support
org.springframework.scheduling.timer
org.springframework.scripting
org.springframework.scripting.bsh
org.springframework.scripting.config
org.springframework.scripting.groovy
org.springframework.scripting.jruby
org.springframework.scripting.support
org.springframework.transaction
org.springframework.transaction.config
org.springframework.transaction.interceptor
org.springframework.transaction.jta
org.springframework.transaction.support
org.springframework.ui
org.springframework.ui.context
org.springframework.ui.context.support
org.springframework.ui.freemarker
org.springframework.ui.jasperreports
org.springframework.ui.velocity
org.springframework.util
org.springframework.util.comparator
org.springframework.util.xml
org.springframework.validation
org.springframework.web
org.springframework.web.bind
org.springframework.web.bind.support
org.springframework.web.context
org.springframework.web.context.request
org.springframework.web.context.support
org.springframework.web.filter
org.springframework.web.jsf
org.springframework.web.multipart
org.springframework.web.multipart.commons
org.springframework.web.multipart.support
org.springframework.web.portlet
org.springframework.web.portlet.bind
org.springframework.web.portlet.context
org.springframework.web.portlet.handler
org.springframework.web.portlet.multipart
org.springframework.web.portlet.mvc
org.springframework.web.portlet.util
org.springframework.web.servlet
org.springframework.web.servlet.handler
org.springframework.web.servlet.handler.metadata
org.springframework.web.servlet.i18n
org.springframework.web.servlet.mvc
org.springframework.web.servlet.mvc.multiaction
org.springframework.web.servlet.mvc.support
org.springframework.web.servlet.mvc.throwaway
org.springframework.web.servlet.support
org.springframework.web.servlet.tags
org.springframework.web.servlet.tags.form
org.springframework.web.servlet.theme
org.springframework.web.servlet.view
org.springframework.web.servlet.view.document
org.springframework.web.servlet.view.freemarker
org.springframework.web.servlet.view.jasperreports
org.springframework.web.servlet.view.tiles
org.springframework.web.servlet.view.velocity
org.springframework.web.servlet.view.xslt
org.springframework.web.struts
org.springframework.web.util

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics