143 super(out, new ClassPath(""), path); 144 // use empty "sourcePath" (see 4666958) 145 this.main = main; 146 } 147 148 /** 149 * Get the instance of Main which created this environment. 150 */ 151 public Main getMain() { 152 return main; 153 } 154 155 /** 156 * Get the ClassPath. 157 */ 158 public ClassPath getClassPath() { 159 return binaryPath; 160 } 161 162 /** list of generated source files created in this environment */ 163 private Vector generatedFiles = new Vector(); 164 165 /** 166 * Remember a generated source file generated so that it 167 * can be removed later, if appropriate. 168 */ 169 public void addGeneratedFile(File file) { 170 generatedFiles.addElement(file); 171 } 172 173 /** 174 * Delete all the generated source files made during the execution 175 * of this environment (those that have been registered with the 176 * "addGeneratedFile" method). 177 */ 178 public void deleteGeneratedFiles() { 179 synchronized(generatedFiles) { 180 Enumeration enumeration = generatedFiles.elements(); 181 while (enumeration.hasMoreElements()) { 182 File file = (File) enumeration.nextElement(); 183 file.delete(); 184 } 185 generatedFiles.removeAllElements(); 186 } 187 } 188 189 /** 190 * Release resources, if any. 191 */ 192 public void shutdown() { 193 main = null; 194 generatedFiles = null; 195 super.shutdown(); 196 } 197 198 /** 199 * Return the formatted, localized string for a named error message 200 * and supplied arguments. For rmic error messages, with names that 201 * being with "rmic.", look up the error message in rmic's resource 202 * bundle; otherwise, defer to java's superclass method. | 143 super(out, new ClassPath(""), path); 144 // use empty "sourcePath" (see 4666958) 145 this.main = main; 146 } 147 148 /** 149 * Get the instance of Main which created this environment. 150 */ 151 public Main getMain() { 152 return main; 153 } 154 155 /** 156 * Get the ClassPath. 157 */ 158 public ClassPath getClassPath() { 159 return binaryPath; 160 } 161 162 /** list of generated source files created in this environment */ 163 private Vector<File> generatedFiles = new Vector<>(); 164 165 /** 166 * Remember a generated source file generated so that it 167 * can be removed later, if appropriate. 168 */ 169 public void addGeneratedFile(File file) { 170 generatedFiles.addElement(file); 171 } 172 173 /** 174 * Delete all the generated source files made during the execution 175 * of this environment (those that have been registered with the 176 * "addGeneratedFile" method). 177 */ 178 public void deleteGeneratedFiles() { 179 synchronized(generatedFiles) { 180 Enumeration<File> enumeration = generatedFiles.elements(); 181 while (enumeration.hasMoreElements()) { 182 File file = enumeration.nextElement(); 183 file.delete(); 184 } 185 generatedFiles.removeAllElements(); 186 } 187 } 188 189 /** 190 * Release resources, if any. 191 */ 192 public void shutdown() { 193 main = null; 194 generatedFiles = null; 195 super.shutdown(); 196 } 197 198 /** 199 * Return the formatted, localized string for a named error message 200 * and supplied arguments. For rmic error messages, with names that 201 * being with "rmic.", look up the error message in rmic's resource 202 * bundle; otherwise, defer to java's superclass method. |