edu.colby.cs.JeSS.util
Class PluginLoader
java.lang.Object
edu.colby.cs.JeSS.util.PluginLoader
- public class PluginLoader
- extends java.lang.Object
This class is responsible for dynamically loading the external
visitors used in a JeSS scan. The class uses the path as set in the
JeSS preferences to search for the external visitors. The type is
checked and the existance of a proper constructor is confirmed. Then
the external visitors are all added to a JeSSVisitorCollection and returned.
Field Summary |
private java.lang.Class[] |
args
|
Method Summary |
JeSSVisitorCollection |
getPluginVisitors(org.eclipse.jface.preference.IPreferenceStore store,
VisitorManager vManager)
This method searches the JeSS plugin folder for class files it then checks
to make sure the class files are valid JeSSVisitors and then instantiates
them and passes them back in a JeSSVisitorCollection |
private boolean |
isValidJeSSVisitor(java.lang.Class userClass)
Check to see if the loaded object is in fact a valid JeSSVisitor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
args
private java.lang.Class[] args
PluginLoader
public PluginLoader()
getPluginVisitors
public JeSSVisitorCollection getPluginVisitors(org.eclipse.jface.preference.IPreferenceStore store,
VisitorManager vManager)
- This method searches the JeSS plugin folder for class files it then checks
to make sure the class files are valid JeSSVisitors and then instantiates
them and passes them back in a JeSSVisitorCollection
- Returns:
- JeSSVisitorCollection - the collection of discovered visitors
isValidJeSSVisitor
private boolean isValidJeSSVisitor(java.lang.Class userClass)
- Check to see if the loaded object is in fact a valid JeSSVisitor. As in,
it is a subclass of JeSSVisitor and it has a constructor that takes type
VisitorManager as a paramter
- Parameters:
userClass
- -
the object to be tested
- Returns:
- boolean - true if a valid visitor