Package org.jppf.classloader
Class ClassLoaderEvent
java.lang.Object
java.util.EventObject
org.jppf.classloader.ClassLoaderEvent
- All Implemented Interfaces:
Serializable
Event emitted by an
AbstractJPPFClassLoader when a class is loaded or not found for the first time.- Author:
- Laurent Cohen
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionClassLoaderEvent(AbstractJPPFClassLoader classLoader, Class<?> loadedClass, boolean foundInURLClassPath) Initialize this event with the specified source and Class object.nClassLoaderEvent(AbstractJPPFClassLoader classLoader, String className) Initialize this event with the specified source and Class object.n -
Method Summary
Modifier and TypeMethodDescriptionGet the class laoder which emitted this event.Get the name of a class that was loaded or could not be found by this class loader.Class<?>Get the class that was successfully loaded.booleanDetermine whether the class was loaded from the class loader's URL classpath.Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
ClassLoaderEvent
public ClassLoaderEvent(AbstractJPPFClassLoader classLoader, Class<?> loadedClass, boolean foundInURLClassPath) Initialize this event with the specified source and Class object.n- Parameters:
classLoader- the source of this event.loadedClass- the class that was successfully loaded.foundInURLClassPath-trueif the class was loaded from the class loader's URL classpath,falseif it was loaded from a remote JPPF driver or client.
-
ClassLoaderEvent
Initialize this event with the specified source and Class object.n- Parameters:
classLoader- the source of this event.className- the name of a class that could not be found by this class loader.
-
-
Method Details
-
getLoadedClass
Get the class that was successfully loaded.- Returns:
- a
Classobject, or null if the class was not found.
-
getClassName
Get the name of a class that was loaded or could not be found by this class loader.- Returns:
- the class name as a string.
-
isFoundInURLClassPath
public boolean isFoundInURLClassPath()Determine whether the class was loaded from the class loader's URL classpath.- Returns:
trueif the class was loaded from the class loader's URL classpath,falseif it was loaded from a remote JPPF driver or client.
-
getClassLoader
Get the class laoder which emitted this event.- Returns:
- a
AbstractJPPFClassLoaderinstance.
-