com.ls.lars.server
Class LarsClassLoader
java.lang.Object
|
+--java.lang.ClassLoader
|
+--com.ls.lars.server.LarsClassLoader
- All Implemented Interfaces:
- Serializable
- public class LarsClassLoader
- extends ClassLoader
- implements Serializable
This class loads any class needed in the "living agent runtime system",
if the class can be found by searching the CLASSPATH.
- Version:
- $Revision: 1.11 $
- Author:
- Last modified by $Author: MFehrenbach $
- See Also:
- Serialized Form
Methods inherited from class java.lang.ClassLoader |
defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setSigners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LarsClassLoader
public LarsClassLoader()
loadClass
public Class loadClass(String className,
boolean resolve)
throws ClassNotFoundException
- Loads a class by a given className. The class should be accessable through the classpath.
- Overrides:
loadClass
in class ClassLoader
- Parameters:
className
- name of the class.resolve
- If true, resolve the class. [Until a class is not resolved (see Java Language Specification
chapter 12), instances cannot be created nor methods called. The resolve flag may be false to
only test for the existence of a class.]- Returns:
- instance of the class given by the className.
- Throws:
ClassNotFoundException
- if the class could not be found
loadClass
public Class loadClass(Map settings,
boolean resolve)
throws ClassNotFoundException,
IOException,
MalformedURLException
- Loads a class by a given className. The class should be accessable through the classpath.
- Parameters:
settings
- the url stuff like protocol, url, path, ... where to find the remote machine.resolve
- If true, resolve the class. [Until a class is not resolved (see Java Language Specification
chapter 12), instances cannot be created nor methods called. The resolve flag may be false to
only test for the existence of a class.]- Returns:
- instance of the class given by the className.
- Throws:
ClassNotFoundException
- if the class could not be foundIOException
- if an I/O error has occurredMalformedURLException
- if the URL was not correct specified
reloadClass
public Class reloadClass(String className,
boolean resolve)
throws ClassNotFoundException
- Reloads a class by a given className. The class should be accessable through the classpath.
- Parameters:
className
- name of the classresolve
- If true, resolve the class. [Until a class is not resolved (see Java Language Specification
chapter 12), instances cannot be created nor methods called. The resolve flag may be false to
only test for the existence of a class.]- Returns:
- an instance of the class given by the className
- Throws:
ClassNotFoundException
- if the class could not be found