src/jdk.rmic/share/classes/sun/tools/java/Package.java
changeset 52902 e3398b2e1ab0
parent 47216 71c04702a3d5
equal deleted inserted replaced
52901:3ba9ff4d4aaf 52902:e3398b2e1ab0
   113         return binaryPath.getFiles(prefix, ".class").hasMoreElements()
   113         return binaryPath.getFiles(prefix, ".class").hasMoreElements()
   114             || sourcePath.getFiles(prefix, ".java").hasMoreElements();
   114             || sourcePath.getFiles(prefix, ".java").hasMoreElements();
   115     }
   115     }
   116 
   116 
   117     private String makeName(String fileName) {
   117     private String makeName(String fileName) {
   118         return pkg.equals("") ? fileName : pkg + File.separator + fileName;
   118         return pkg.isEmpty() ? fileName : pkg + File.separator + fileName;
   119     }
   119     }
   120 
   120 
   121     /**
   121     /**
   122      * Get the .class file of a class
   122      * Get the .class file of a class
   123      */
   123      */
   151     public Enumeration<ClassFile> getBinaryFiles() {
   151     public Enumeration<ClassFile> getBinaryFiles() {
   152         return binaryPath.getFiles(pkg, ".class");
   152         return binaryPath.getFiles(pkg, ".class");
   153     }
   153     }
   154 
   154 
   155     public String toString() {
   155     public String toString() {
   156         if (pkg.equals("")) {
   156         if (pkg.isEmpty()) {
   157             return "unnamed package";
   157             return "unnamed package";
   158         }
   158         }
   159         return "package " + pkg;
   159         return "package " + pkg;
   160     }
   160     }
   161 }
   161 }