org.pfsw.plugin
Class PluginUtil

java.lang.Object
  extended by org.pfsw.plugin.PluginUtil

public class PluginUtil
extends java.lang.Object

Provides helper methods around the PF plug-in mechanism.


Field Summary
static PluginUtil PU
           
static java.lang.String SYS_PROP_PLUGIN_PATH
           
 
Constructor Summary
protected PluginUtil()
          Initialize the new instance with default values.
 
Method Summary
protected  org.pfsw.util.CollectionUtil collUtil()
           
static PluginUtil current()
          Returns the only instance this class supports (design pattern "Singleton")
protected  org.pfsw.file.FileUtil fileUtil()
           
 java.lang.ClassLoader getClassLoader(java.lang.ClassLoader... suggestedClassLoaders)
          Returns the first non-null classloader from the following order: suggestedClassLoaders The current thread's context class loader the class loader of this class the system class loader or throws an IllegalStateException if no classloader can be found.
 org.pfsw.file.Classpath getPluginClasspath()
          Returns the classpath that is used to lookup any plug-in information files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PU

public static final PluginUtil PU

SYS_PROP_PLUGIN_PATH

public static final java.lang.String SYS_PROP_PLUGIN_PATH
See Also:
Constant Field Values
Constructor Detail

PluginUtil

protected PluginUtil()
Initialize the new instance with default values.

Method Detail

current

public static PluginUtil current()
Returns the only instance this class supports (design pattern "Singleton")


getPluginClasspath

public org.pfsw.file.Classpath getPluginClasspath()
Returns the classpath that is used to lookup any plug-in information files.


getClassLoader

public java.lang.ClassLoader getClassLoader(java.lang.ClassLoader... suggestedClassLoaders)
Returns the first non-null classloader from the following order:
  1. suggestedClassLoaders
  2. The current thread's context class loader
  3. the class loader of this class
  4. the system class loader
or throws an IllegalStateException if no classloader can be found.


fileUtil

protected org.pfsw.file.FileUtil fileUtil()

collUtil

protected org.pfsw.util.CollectionUtil collUtil()