|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectconsciouscode.util.ClassPathIterator
public class ClassPathIterator
Navigates the .class files in a classpath.
The iteration returns the fully-qualified class names.
| Field Summary | |
|---|---|
static String |
EXTENSION
|
| Constructor Summary | |
|---|---|
ClassPathIterator(File directory)
Create an iterator that returns the classes in a single directory tree. |
|
ClassPathIterator(String pathList)
Create an iterator that returns the classes in a list of directories. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
|
String |
next()
Return a String holding the fully-qualified name of the next class. |
String |
nextClassName()
Return the fully-qualified name of the next class. |
void |
remove()
Unsupported operation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EXTENSION
| Constructor Detail |
|---|
public ClassPathIterator(File directory)
throws IOException
directory - must indicate a valid classpath directory; it is
assumed that the files within this directory are arranged in accordance
with their package structure.
IOException
public ClassPathIterator(String pathList)
throws IOException
pathList - must be a standard Java class path, where each directory
has a structure matching the class package hierarchy. Multiple directory
roots are indicated using the platform's File.pathSeparator.
Any elements that do not identify a readable directory are ignored.
IOException| Method Detail |
|---|
public final String nextClassName()
public boolean hasNext()
hasNext in interface Iterator<String>public String next()
next in interface Iterator<String>
public void remove()
throws UnsupportedOperationException
remove in interface Iterator<String>UnsupportedOperationException - in all cases.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||