Package com.google.opengse.io

Examples of com.google.opengse.io.FileCollection


  /**
   * Get all of the non-jdk packages in the current classpath.
   */
  public static Set<String> getAllPackages() throws IOException {
    FileCollection fileCollection = getClasspathAsFileCollection();
    FileCollection jdkFileCollection = JDKFileCollection.getFileCollection();
    Set<String> packages = new TreeSet<String>();
    for (String filename : fileCollection.getFileNames()) {
      if (filename.endsWith(CLASS_SUFFIX)) {
        if (!jdkFileCollection.containsFile(filename)) {
          filename = filename
              .substring(0, filename.length() - CLASS_SUFFIX.length());
          String classname = filename.replace(File.separatorChar, '.');
          String pkg = getPackage(classname);
          packages.add(pkg);
View Full Code Here


    Set<String> classes = new TreeSet<String>();
    int pkglength = pkg.length();
    if (pkglength > 0) {
      ++pkglength;
    }
    FileCollection fileCollection = getClasspathAsFileCollection();
    for (String filename : fileCollection.getFileNames()) {
      if (filename.endsWith(CLASS_SUFFIX)) {
        filename = filename.substring(0, filename.length() - 6);
        String classname = filename.replace('/', '.');
        if (classname.startsWith(pkg)
            && classname.substring(pkglength).indexOf('.') == -1) {
View Full Code Here

TOP

Related Classes of com.google.opengse.io.FileCollection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.