com.dctl.j2me.system
Class ClassLoader
java.lang.Object
|
+--com.dctl.j2me.system.ClassLoader
- Direct Known Subclasses:
- DynamicClassLoader
- public class ClassLoader
- extends Object
The class loader can be used to dynamically load classes. There is one instance of a class
loader in the system and all requests for new classes go through it.
The basic sequence is reasonable straightforward. The user calls 'Class.forName()' to load
a class. This results in the basic 'ClassLoader.loadClass()' method being called. This
calls 'getBuiltinClass()' to try and load a builtin class. If this fails and dynamic
loading is enabled then the 'DynamicClassLoader.loadClass()' is called to load the class
dynamically.
defaultClassLoader
public static final ClassLoader defaultClassLoader
- The class loader to use
ClassLoader
public ClassLoader()
loadClass
public Class loadClass(java.lang.String name)
throws ClassNotFoundException
- Load a class
- Parameters:
name - The name of the class
- Throws:
ClassNotFoundException - if the class cannot be found
setDynamicClassLoader
public void setDynamicClassLoader(ClassLoader dl)
loadResource
public InputStream loadResource(java.lang.String name)
- Load a resource. This returns null in the default as there is nowhere to load from
- Returns:
- the input stream
DCT Lightfoot v3 API specification