|
|
@ -71,9 +71,9 @@ public class ClassInfo extends BinaryInfo { |
|
|
|
return classpath.isDirectory(name.replace('.', '/')); |
|
|
|
return classpath.isDirectory(name.replace('.', '/')); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static Enumeration getClasses(final String packageName) { |
|
|
|
public static Enumeration getClassesAndPackages(final String packageName) { |
|
|
|
final Enumeration enum = |
|
|
|
final Enumeration enum = |
|
|
|
classpath.listClassFiles(packageName.replace('.','/')); |
|
|
|
classpath.listFiles(packageName.replace('.','/')); |
|
|
|
return new Enumeration() { |
|
|
|
return new Enumeration() { |
|
|
|
public boolean hasMoreElements() { |
|
|
|
public boolean hasMoreElements() { |
|
|
|
return enum.hasMoreElements(); |
|
|
|
return enum.hasMoreElements(); |
|
|
@ -81,9 +81,9 @@ public class ClassInfo extends BinaryInfo { |
|
|
|
public Object nextElement() { |
|
|
|
public Object nextElement() { |
|
|
|
String name = (String) enum.nextElement(); |
|
|
|
String name = (String) enum.nextElement(); |
|
|
|
if (!name.endsWith(".class")) |
|
|
|
if (!name.endsWith(".class")) |
|
|
|
throw new jode.AssertError("Wrong file name"); |
|
|
|
// This is a package
|
|
|
|
return ClassInfo.forName(packageName + "." |
|
|
|
return name; |
|
|
|
+ name.substring(0, name.length()-6)); |
|
|
|
return name.substring(0, name.length()-6); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|