annotate agent/make/ClosureFinder.java @ 3237:399aa66d375e

Fixed a bug in which the valueEquals method was misused. The method does only check the equality of the node data and not full GVN equality by taking inputs and successors into account.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Jul 2011 14:16:38 -0700
parents c18cbe5936b8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
2 * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 import java.io.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
26 import java.util.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
27
a61af66fc99e Initial load
duke
parents:
diff changeset
28
a61af66fc99e Initial load
duke
parents:
diff changeset
29 /**
a61af66fc99e Initial load
duke
parents:
diff changeset
30 <p> This class finds transitive closure of dependencies from a given
a61af66fc99e Initial load
duke
parents:
diff changeset
31 root set of classes. If your project has lots of .class files and you
a61af66fc99e Initial load
duke
parents:
diff changeset
32 want to ship only those .class files which are used (transitively)
a61af66fc99e Initial load
duke
parents:
diff changeset
33 from a root set of classes, then you can use this utility. </p> <p>
a61af66fc99e Initial load
duke
parents:
diff changeset
34 How does it work?</p>
a61af66fc99e Initial load
duke
parents:
diff changeset
35
a61af66fc99e Initial load
duke
parents:
diff changeset
36 <p> We walk through all constant pool entries of a given class and
a61af66fc99e Initial load
duke
parents:
diff changeset
37 find all modified UTF-8 entries. Anything that looks like a class name is
a61af66fc99e Initial load
duke
parents:
diff changeset
38 considered as a class and we search for that class in the given
a61af66fc99e Initial load
duke
parents:
diff changeset
39 classpath. If we find a .class of that name, then we add that class to
a61af66fc99e Initial load
duke
parents:
diff changeset
40 list.</p>
a61af66fc99e Initial load
duke
parents:
diff changeset
41
a61af66fc99e Initial load
duke
parents:
diff changeset
42 <p> We could have used CONSTANT_ClassInfo type constants only. But
a61af66fc99e Initial load
duke
parents:
diff changeset
43 that will miss classes used through Class.forName or xyz.class
a61af66fc99e Initial load
duke
parents:
diff changeset
44 construct. But, if you refer to a class name in some other string we
a61af66fc99e Initial load
duke
parents:
diff changeset
45 would include it as dependency :(. But this is quite unlikely
a61af66fc99e Initial load
duke
parents:
diff changeset
46 anyway. To look for exact Class.forName argument(s) would involve
a61af66fc99e Initial load
duke
parents:
diff changeset
47 bytecode analysis. Also, we handle only simple reflection. If you
a61af66fc99e Initial load
duke
parents:
diff changeset
48 accept name of a class from externally (for eg properties file or
a61af66fc99e Initial load
duke
parents:
diff changeset
49 command line args for example, this utility will not be able to find
a61af66fc99e Initial load
duke
parents:
diff changeset
50 that dependency. In such cases, include those classes in the root set.
a61af66fc99e Initial load
duke
parents:
diff changeset
51 </p>
a61af66fc99e Initial load
duke
parents:
diff changeset
52 */
a61af66fc99e Initial load
duke
parents:
diff changeset
53
a61af66fc99e Initial load
duke
parents:
diff changeset
54 public class ClosureFinder {
a61af66fc99e Initial load
duke
parents:
diff changeset
55 private Collection roots; // root class names Collection<String>
a61af66fc99e Initial load
duke
parents:
diff changeset
56 private Map visitedClasses; // set of all dependencies as a Map
a61af66fc99e Initial load
duke
parents:
diff changeset
57 private String classPath; // classpath to look for .class files
a61af66fc99e Initial load
duke
parents:
diff changeset
58 private String[] pathComponents; // classpath components
a61af66fc99e Initial load
duke
parents:
diff changeset
59 private static final boolean isWindows = File.separatorChar != '/';
a61af66fc99e Initial load
duke
parents:
diff changeset
60
a61af66fc99e Initial load
duke
parents:
diff changeset
61 public ClosureFinder(Collection roots, String classPath) {
a61af66fc99e Initial load
duke
parents:
diff changeset
62 this.roots = roots;
a61af66fc99e Initial load
duke
parents:
diff changeset
63 this.classPath = classPath;
a61af66fc99e Initial load
duke
parents:
diff changeset
64 parseClassPath();
a61af66fc99e Initial load
duke
parents:
diff changeset
65 }
a61af66fc99e Initial load
duke
parents:
diff changeset
66
a61af66fc99e Initial load
duke
parents:
diff changeset
67 // parse classPath into pathComponents array
a61af66fc99e Initial load
duke
parents:
diff changeset
68 private void parseClassPath() {
a61af66fc99e Initial load
duke
parents:
diff changeset
69 List paths = new ArrayList();
a61af66fc99e Initial load
duke
parents:
diff changeset
70 StringTokenizer st = new StringTokenizer(classPath, File.pathSeparator);
a61af66fc99e Initial load
duke
parents:
diff changeset
71 while (st.hasMoreTokens())
a61af66fc99e Initial load
duke
parents:
diff changeset
72 paths.add(st.nextToken());
a61af66fc99e Initial load
duke
parents:
diff changeset
73
a61af66fc99e Initial load
duke
parents:
diff changeset
74 Object[] arr = paths.toArray();
a61af66fc99e Initial load
duke
parents:
diff changeset
75 pathComponents = new String[arr.length];
a61af66fc99e Initial load
duke
parents:
diff changeset
76 System.arraycopy(arr, 0, pathComponents, 0, arr.length);
a61af66fc99e Initial load
duke
parents:
diff changeset
77 }
a61af66fc99e Initial load
duke
parents:
diff changeset
78
a61af66fc99e Initial load
duke
parents:
diff changeset
79 // if output is aleady not computed, compute it now
a61af66fc99e Initial load
duke
parents:
diff changeset
80 // result is a map from class file name to base path where the .class was found
a61af66fc99e Initial load
duke
parents:
diff changeset
81 public Map find() {
a61af66fc99e Initial load
duke
parents:
diff changeset
82 if (visitedClasses == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
83 visitedClasses = new HashMap();
a61af66fc99e Initial load
duke
parents:
diff changeset
84 computeClosure();
a61af66fc99e Initial load
duke
parents:
diff changeset
85 }
a61af66fc99e Initial load
duke
parents:
diff changeset
86 return visitedClasses;
a61af66fc99e Initial load
duke
parents:
diff changeset
87 }
a61af66fc99e Initial load
duke
parents:
diff changeset
88
a61af66fc99e Initial load
duke
parents:
diff changeset
89 // compute closure for all given root classes
a61af66fc99e Initial load
duke
parents:
diff changeset
90 private void computeClosure() {
a61af66fc99e Initial load
duke
parents:
diff changeset
91 for (Iterator rootsItr = roots.iterator(); rootsItr.hasNext();) {
a61af66fc99e Initial load
duke
parents:
diff changeset
92 String name = (String) rootsItr.next();
a61af66fc99e Initial load
duke
parents:
diff changeset
93 name = name.substring(0, name.indexOf(".class"));
a61af66fc99e Initial load
duke
parents:
diff changeset
94 computeClosure(name);
a61af66fc99e Initial load
duke
parents:
diff changeset
95 }
a61af66fc99e Initial load
duke
parents:
diff changeset
96 }
a61af66fc99e Initial load
duke
parents:
diff changeset
97
a61af66fc99e Initial load
duke
parents:
diff changeset
98
a61af66fc99e Initial load
duke
parents:
diff changeset
99 // looks up for .class in pathComponents and returns
a61af66fc99e Initial load
duke
parents:
diff changeset
100 // base path if found, else returns null
a61af66fc99e Initial load
duke
parents:
diff changeset
101 private String lookupClassFile(String classNameAsPath) {
a61af66fc99e Initial load
duke
parents:
diff changeset
102 for (int i = 0; i < pathComponents.length; i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
103 File f = new File(pathComponents[i] + File.separator +
a61af66fc99e Initial load
duke
parents:
diff changeset
104 classNameAsPath + ".class");
a61af66fc99e Initial load
duke
parents:
diff changeset
105 if (f.exists()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
106 if (isWindows) {
a61af66fc99e Initial load
duke
parents:
diff changeset
107 String name = f.getName();
a61af66fc99e Initial load
duke
parents:
diff changeset
108 // Windows reports special devices AUX,NUL,CON as files
a61af66fc99e Initial load
duke
parents:
diff changeset
109 // under any directory. It does not care about file extention :-(
a61af66fc99e Initial load
duke
parents:
diff changeset
110 if (name.compareToIgnoreCase("AUX.class") == 0 ||
a61af66fc99e Initial load
duke
parents:
diff changeset
111 name.compareToIgnoreCase("NUL.class") == 0 ||
a61af66fc99e Initial load
duke
parents:
diff changeset
112 name.compareToIgnoreCase("CON.class") == 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
113 return null;
a61af66fc99e Initial load
duke
parents:
diff changeset
114 }
a61af66fc99e Initial load
duke
parents:
diff changeset
115 }
a61af66fc99e Initial load
duke
parents:
diff changeset
116 return pathComponents[i];
a61af66fc99e Initial load
duke
parents:
diff changeset
117 }
a61af66fc99e Initial load
duke
parents:
diff changeset
118 }
a61af66fc99e Initial load
duke
parents:
diff changeset
119 return null;
a61af66fc99e Initial load
duke
parents:
diff changeset
120 }
a61af66fc99e Initial load
duke
parents:
diff changeset
121
a61af66fc99e Initial load
duke
parents:
diff changeset
122
a61af66fc99e Initial load
duke
parents:
diff changeset
123 // from JVM spec. 2'nd edition section 4.4
a61af66fc99e Initial load
duke
parents:
diff changeset
124 private static final int CONSTANT_Class = 7;
a61af66fc99e Initial load
duke
parents:
diff changeset
125 private static final int CONSTANT_FieldRef = 9;
a61af66fc99e Initial load
duke
parents:
diff changeset
126 private static final int CONSTANT_MethodRef = 10;
a61af66fc99e Initial load
duke
parents:
diff changeset
127 private static final int CONSTANT_InterfaceMethodRef = 11;
a61af66fc99e Initial load
duke
parents:
diff changeset
128 private static final int CONSTANT_String = 8;
a61af66fc99e Initial load
duke
parents:
diff changeset
129 private static final int CONSTANT_Integer = 3;
a61af66fc99e Initial load
duke
parents:
diff changeset
130 private static final int CONSTANT_Float = 4;
a61af66fc99e Initial load
duke
parents:
diff changeset
131 private static final int CONSTANT_Long = 5;
a61af66fc99e Initial load
duke
parents:
diff changeset
132 private static final int CONSTANT_Double = 6;
a61af66fc99e Initial load
duke
parents:
diff changeset
133 private static final int CONSTANT_NameAndType = 12;
a61af66fc99e Initial load
duke
parents:
diff changeset
134 private static final int CONSTANT_Utf8 = 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
135
a61af66fc99e Initial load
duke
parents:
diff changeset
136 // whether a given string may be a class name?
a61af66fc99e Initial load
duke
parents:
diff changeset
137 private boolean mayBeClassName(String internalClassName) {
a61af66fc99e Initial load
duke
parents:
diff changeset
138 int len = internalClassName.length();
a61af66fc99e Initial load
duke
parents:
diff changeset
139 for (int s = 0; s < len; s++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
140 char c = internalClassName.charAt(s);
a61af66fc99e Initial load
duke
parents:
diff changeset
141 if (!Character.isJavaIdentifierPart(c) && c != '/')
a61af66fc99e Initial load
duke
parents:
diff changeset
142 return false;
a61af66fc99e Initial load
duke
parents:
diff changeset
143 }
a61af66fc99e Initial load
duke
parents:
diff changeset
144 return true;
a61af66fc99e Initial load
duke
parents:
diff changeset
145 }
a61af66fc99e Initial load
duke
parents:
diff changeset
146
a61af66fc99e Initial load
duke
parents:
diff changeset
147 // compute closure for a given class
a61af66fc99e Initial load
duke
parents:
diff changeset
148 private void computeClosure(String className) {
a61af66fc99e Initial load
duke
parents:
diff changeset
149 if (visitedClasses.get(className) != null) return;
a61af66fc99e Initial load
duke
parents:
diff changeset
150 String basePath = lookupClassFile(className);
a61af66fc99e Initial load
duke
parents:
diff changeset
151 if (basePath != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
152 visitedClasses.put(className, basePath);
a61af66fc99e Initial load
duke
parents:
diff changeset
153 try {
a61af66fc99e Initial load
duke
parents:
diff changeset
154 File classFile = new File(basePath + File.separator + className + ".class");
a61af66fc99e Initial load
duke
parents:
diff changeset
155 FileInputStream fis = new FileInputStream(classFile);
a61af66fc99e Initial load
duke
parents:
diff changeset
156 DataInputStream dis = new DataInputStream(fis);
a61af66fc99e Initial load
duke
parents:
diff changeset
157 // look for .class signature
a61af66fc99e Initial load
duke
parents:
diff changeset
158 if (dis.readInt() != 0xcafebabe) {
a61af66fc99e Initial load
duke
parents:
diff changeset
159 System.err.println(classFile.getAbsolutePath() + " is not a valid .class file");
a61af66fc99e Initial load
duke
parents:
diff changeset
160 return;
a61af66fc99e Initial load
duke
parents:
diff changeset
161 }
a61af66fc99e Initial load
duke
parents:
diff changeset
162
a61af66fc99e Initial load
duke
parents:
diff changeset
163 // ignore major and minor version numbers
a61af66fc99e Initial load
duke
parents:
diff changeset
164 dis.readShort();
a61af66fc99e Initial load
duke
parents:
diff changeset
165 dis.readShort();
a61af66fc99e Initial load
duke
parents:
diff changeset
166
a61af66fc99e Initial load
duke
parents:
diff changeset
167 // read number of constant pool constants
a61af66fc99e Initial load
duke
parents:
diff changeset
168 int numConsts = (int) dis.readShort();
a61af66fc99e Initial load
duke
parents:
diff changeset
169 String[] strings = new String[numConsts];
a61af66fc99e Initial load
duke
parents:
diff changeset
170
a61af66fc99e Initial load
duke
parents:
diff changeset
171 // zero'th entry is unused
a61af66fc99e Initial load
duke
parents:
diff changeset
172 for (int cpIndex = 1; cpIndex < numConsts; cpIndex++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
173 int constType = (int) dis.readByte();
a61af66fc99e Initial load
duke
parents:
diff changeset
174 switch (constType) {
a61af66fc99e Initial load
duke
parents:
diff changeset
175 case CONSTANT_Class:
a61af66fc99e Initial load
duke
parents:
diff changeset
176 case CONSTANT_String:
a61af66fc99e Initial load
duke
parents:
diff changeset
177 dis.readShort(); // string name index;
a61af66fc99e Initial load
duke
parents:
diff changeset
178 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
179
a61af66fc99e Initial load
duke
parents:
diff changeset
180 case CONSTANT_FieldRef:
a61af66fc99e Initial load
duke
parents:
diff changeset
181 case CONSTANT_MethodRef:
a61af66fc99e Initial load
duke
parents:
diff changeset
182 case CONSTANT_InterfaceMethodRef:
a61af66fc99e Initial load
duke
parents:
diff changeset
183 case CONSTANT_NameAndType:
a61af66fc99e Initial load
duke
parents:
diff changeset
184 case CONSTANT_Integer:
a61af66fc99e Initial load
duke
parents:
diff changeset
185 case CONSTANT_Float:
a61af66fc99e Initial load
duke
parents:
diff changeset
186 // all these are 4 byte constants
a61af66fc99e Initial load
duke
parents:
diff changeset
187 dis.readInt();
a61af66fc99e Initial load
duke
parents:
diff changeset
188 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
189
a61af66fc99e Initial load
duke
parents:
diff changeset
190 case CONSTANT_Long:
a61af66fc99e Initial load
duke
parents:
diff changeset
191 case CONSTANT_Double:
a61af66fc99e Initial load
duke
parents:
diff changeset
192 // 8 byte constants
a61af66fc99e Initial load
duke
parents:
diff changeset
193 dis.readLong();
a61af66fc99e Initial load
duke
parents:
diff changeset
194 // occupies 2 cp entries
a61af66fc99e Initial load
duke
parents:
diff changeset
195 cpIndex++;
a61af66fc99e Initial load
duke
parents:
diff changeset
196 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
197
a61af66fc99e Initial load
duke
parents:
diff changeset
198
a61af66fc99e Initial load
duke
parents:
diff changeset
199 case CONSTANT_Utf8: {
a61af66fc99e Initial load
duke
parents:
diff changeset
200 strings[cpIndex] = dis.readUTF();
a61af66fc99e Initial load
duke
parents:
diff changeset
201 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
202 }
a61af66fc99e Initial load
duke
parents:
diff changeset
203
a61af66fc99e Initial load
duke
parents:
diff changeset
204 default:
a61af66fc99e Initial load
duke
parents:
diff changeset
205 System.err.println("invalid constant pool entry");
a61af66fc99e Initial load
duke
parents:
diff changeset
206 return;
a61af66fc99e Initial load
duke
parents:
diff changeset
207 }
a61af66fc99e Initial load
duke
parents:
diff changeset
208 }
a61af66fc99e Initial load
duke
parents:
diff changeset
209
a61af66fc99e Initial load
duke
parents:
diff changeset
210 // now walk thru the string constants and look for class names
a61af66fc99e Initial load
duke
parents:
diff changeset
211 for (int s = 0; s < numConsts; s++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
212 if (strings[s] != null && mayBeClassName(strings[s]))
a61af66fc99e Initial load
duke
parents:
diff changeset
213 computeClosure(strings[s].replace('/', File.separatorChar));
a61af66fc99e Initial load
duke
parents:
diff changeset
214 }
a61af66fc99e Initial load
duke
parents:
diff changeset
215
a61af66fc99e Initial load
duke
parents:
diff changeset
216 } catch (IOException exp) {
a61af66fc99e Initial load
duke
parents:
diff changeset
217 // ignore for now
a61af66fc99e Initial load
duke
parents:
diff changeset
218 }
a61af66fc99e Initial load
duke
parents:
diff changeset
219
a61af66fc99e Initial load
duke
parents:
diff changeset
220 }
a61af66fc99e Initial load
duke
parents:
diff changeset
221 }
a61af66fc99e Initial load
duke
parents:
diff changeset
222
a61af66fc99e Initial load
duke
parents:
diff changeset
223 // a sample main that accepts roots classes in a file and classpath as args
a61af66fc99e Initial load
duke
parents:
diff changeset
224 public static void main(String[] args) {
a61af66fc99e Initial load
duke
parents:
diff changeset
225 if (args.length != 2) {
a61af66fc99e Initial load
duke
parents:
diff changeset
226 System.err.println("Usage: ClosureFinder <root class file> <class path>");
a61af66fc99e Initial load
duke
parents:
diff changeset
227 System.exit(1);
a61af66fc99e Initial load
duke
parents:
diff changeset
228 }
a61af66fc99e Initial load
duke
parents:
diff changeset
229
a61af66fc99e Initial load
duke
parents:
diff changeset
230 List roots = new ArrayList();
a61af66fc99e Initial load
duke
parents:
diff changeset
231 try {
a61af66fc99e Initial load
duke
parents:
diff changeset
232 FileInputStream fis = new FileInputStream(args[0]);
a61af66fc99e Initial load
duke
parents:
diff changeset
233 DataInputStream dis = new DataInputStream(fis);
a61af66fc99e Initial load
duke
parents:
diff changeset
234 String line = null;
a61af66fc99e Initial load
duke
parents:
diff changeset
235 while ((line = dis.readLine()) != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
236 if (isWindows) {
a61af66fc99e Initial load
duke
parents:
diff changeset
237 line = line.replace('/', File.separatorChar);
a61af66fc99e Initial load
duke
parents:
diff changeset
238 }
a61af66fc99e Initial load
duke
parents:
diff changeset
239 roots.add(line);
a61af66fc99e Initial load
duke
parents:
diff changeset
240 }
a61af66fc99e Initial load
duke
parents:
diff changeset
241 } catch (IOException exp) {
a61af66fc99e Initial load
duke
parents:
diff changeset
242 System.err.println(exp.getMessage());
a61af66fc99e Initial load
duke
parents:
diff changeset
243 System.exit(2);
a61af66fc99e Initial load
duke
parents:
diff changeset
244 }
a61af66fc99e Initial load
duke
parents:
diff changeset
245
a61af66fc99e Initial load
duke
parents:
diff changeset
246 ClosureFinder cf = new ClosureFinder(roots, args[1]);
a61af66fc99e Initial load
duke
parents:
diff changeset
247 Map out = cf.find();
a61af66fc99e Initial load
duke
parents:
diff changeset
248 Iterator res = out.keySet().iterator();
a61af66fc99e Initial load
duke
parents:
diff changeset
249 for(; res.hasNext(); ) {
a61af66fc99e Initial load
duke
parents:
diff changeset
250 String className = (String) res.next();
a61af66fc99e Initial load
duke
parents:
diff changeset
251 System.out.println(className + ".class");
a61af66fc99e Initial load
duke
parents:
diff changeset
252 }
a61af66fc99e Initial load
duke
parents:
diff changeset
253 }
a61af66fc99e Initial load
duke
parents:
diff changeset
254 }