Package repast.simphony.scenario.data
Class Classpath
java.lang.Object
repast.simphony.scenario.data.Classpath
Encapsulates a classpath.
- Author:
- Nick Collier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds the specified entry to the classpath.boolean
addEntry
(ClassPathEntry entry) Adds the specified entry to the classpath.Gets an iterable over all the possible paths on which classes may be found.entries()
Gets an iterable over all the classpath entries.Gets the classes in the currently added entries.
-
Constructor Details
-
Classpath
public Classpath()
-
-
Method Details
-
addEntry
Adds the specified entry to the classpath. If the entry is a directory and it contains any .class files or its children of the directory contain any .class path the directory itself will be added. If the directory contains any jar files those will be added as well.If the entry ends with .jar that jar file will be added.
- Parameters:
entry
- the entry to add- Returns:
- true if classes or jars were found and the entry was added, otherwise false.
-
addEntry
Adds the specified entry to the classpath. If the entry is a directory and it contains any .class files or its children of the directory contain any .class path the directory itself will be added. If the directory contains any jar files those will be added as well.If the entry ends with .jar that jar file will be added.
- Parameters:
entry
- the entry to add- Returns:
- true if classes or jars were found and the entry was added, otherwise false.
-
getClasses
Gets the classes in the currently added entries.- Returns:
- the classes in the currently added entries.
- Throws:
ClassNotFoundException
IOException
-
entries
Gets an iterable over all the classpath entries.- Returns:
- an iterable over all the classpath entries.
-
classPaths
Gets an iterable over all the possible paths on which classes may be found. These include top level directories and jar files.- Returns:
- an iterable over all the possible paths on which classes may be found. These include top level directories and jar files.
-