Package repast.simphony.util
Class ClassFinder
- java.lang.Object
-
- repast.simphony.util.ClassFinder
-
public class ClassFinder extends Object
Finds all the classes on a given path(s). Optional filters can be provided to refine the results.- Author:
- Nick Collier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
ClassFinder.Adder
-
Constructor Summary
Constructors Constructor Description ClassFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEntry(ClassPathEntry entry)
List<Class<?>>
findClasses()
Gets the classes in the currently added entries, applying any filters.List<String>
findClassNames()
protected void
processJar(ClassPathEntry entry, File path, ClassFinder.Adder adder)
-
-
-
Method Detail
-
addEntry
public void addEntry(ClassPathEntry entry)
-
findClassNames
public List<String> findClassNames() throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
findClasses
public List<Class<?>> findClasses() throws IOException, ClassNotFoundException
Gets the classes in the currently added entries, applying any filters. Assumes the entries are already on the classpath.- Returns:
- the classes in the currently added entries.
- Throws:
ClassNotFoundException
IOException
-
processJar
protected void processJar(ClassPathEntry entry, File path, ClassFinder.Adder adder) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
-