edu.colby.cs.JeSS.util
Class PluginLoader

java.lang.Object
  extended byedu.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.


Nested Class Summary
private  class PluginLoader.classFileFilter
          The FileFilter that is used to screen out non-class files
private  class PluginLoader.JeSSPluginLoader
          This is a private ClassLoader that loads a class from file on disk.
 
Field Summary
private  java.lang.Class[] args
           
 
Constructor Summary
PluginLoader()
           
 
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
 

Field Detail

args

private java.lang.Class[] args
Constructor Detail

PluginLoader

public PluginLoader()
Method Detail

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