Class DDRInteractiveClassLoader
java.lang.Object
java.lang.ClassLoader
com.ibm.j9ddr.tools.ddrinteractive.plugins.DDRInteractiveClassLoader
DDR Interactive classloader which is responsible for finding all classes specified by the plugins property.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDDRInteractiveClassLoader
(IVMData vmdata) DDRInteractiveClassLoader
(IVMData vmdata, ClassLoader loader) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommandClass
(String className) Class
<?> Searches for and loads a class from the plugins search path.protected boolean
hasCommandIFace
(Class<?> clazz) Check to see if a class implements the command interfacevoid
Scans the plugins classpath and loads any DTFJPlugins foundvoid
removeCommandClass
(String className) Methods declared in class java.lang.ClassLoader
clearAssertionStatus, clone, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Field Details
-
PLUGIN_SYSTEM_PROPERTY
System property which will be used to scan for plugins.- See Also:
-
PLUGIN_ENV_VAR
The name of the environment variable which will set the plugin search path. An explicitly set system property will override this setting.- See Also:
-
PLUGIN_ENV_VAR_ALT
- See Also:
-
runtimeCommandClasses
-
-
Constructor Details
-
DDRInteractiveClassLoader
- Throws:
DDRInteractiveCommandException
-
DDRInteractiveClassLoader
public DDRInteractiveClassLoader(IVMData vmdata, ClassLoader loader) throws DDRInteractiveCommandException - Throws:
DDRInteractiveCommandException
- if the -Dplugins property contains a bad path
-
-
Method Details
-
loadPlugins
Scans the plugins classpath and loads any DTFJPlugins found -
hasCommandIFace
Check to see if a class implements the command interface- Parameters:
clazz
- class to test- Returns:
- true if the interface is implemented, false if not
-
getPlugins
-
getPluginFailures
-
findClass
Searches for and loads a class from the plugins search path.- Overrides:
findClass
in classClassLoader
- Parameters:
className
- String the name of the class to search for.- Returns:
- the loaded class or null
- Throws:
ClassNotFoundException
- always, unless overridden.
-
addCommandClass
-
removeCommandClass
-